From b8013661a2ac465dbe4dd545757d5274b517c609 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ana=20Mar=C3=ADa=20Mart=C3=ADnez=20G=C3=B3mez?= Date: Mon, 13 May 2019 17:15:31 +0200 Subject: [PATCH] Use render plain instead text `render text` is deprecated and it has been remvoed from Rails 5.1. --- app/controllers/admin/commercials_controller.rb | 4 ++-- app/controllers/admin/venue_commercials_controller.rb | 4 ++-- app/controllers/commercials_controller.rb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/controllers/admin/commercials_controller.rb b/app/controllers/admin/commercials_controller.rb index 0680b436..e361086d 100644 --- a/app/controllers/admin/commercials_controller.rb +++ b/app/controllers/admin/commercials_controller.rb @@ -45,9 +45,9 @@ module Admin def render_commercial result = Commercial.render_from_url(params[:url]) if result[:error] - render text: result[:error], status: 400 + render plain: result[:error], status: 400 else - render text: result[:html] + render plain: result[:html] end end diff --git a/app/controllers/admin/venue_commercials_controller.rb b/app/controllers/admin/venue_commercials_controller.rb index 3be0ec47..ddd13aa9 100644 --- a/app/controllers/admin/venue_commercials_controller.rb +++ b/app/controllers/admin/venue_commercials_controller.rb @@ -40,9 +40,9 @@ module Admin def render_commercial result = Commercial.render_from_url(params[:url]) if result[:error] - render text: result[:error], status: 400 + render plain: result[:error], status: 400 else - render text: result[:html] + render plain: result[:html] end end diff --git a/app/controllers/commercials_controller.rb b/app/controllers/commercials_controller.rb index 13b9b2d4..1967d0d1 100644 --- a/app/controllers/commercials_controller.rb +++ b/app/controllers/commercials_controller.rb @@ -37,9 +37,9 @@ class CommercialsController < ApplicationController def render_commercial result = Commercial.render_from_url(params[:url]) if result[:error] - render text: result[:error], status: 400 + render plain: result[:error], status: 400 else - render text: result[:html] + render plain: result[:html] end end