lib/scrivito/controller_actions.rb in scrivito_sdk-1.6.1 vs lib/scrivito/controller_actions.rb in scrivito_sdk-1.7.0.rc1
- old
+ new
@@ -14,19 +14,21 @@
#
module ControllerActions
extend ActiveSupport::Concern
included do
- before_filter :require_authenticated_editor, only: [
+ before_action :require_authenticated_editor, only: [
:show_widget,
:widget_details,
:page_details,
]
- before_filter :load_object
+ before_action :load_object
- hide_action :on_scrivito_widget_error
+ if LegacySwitch.rails4?
+ hide_action :on_scrivito_widget_error
+ end
helper :scrivito
end
#
@@ -42,11 +44,11 @@
def show_widget
widget = load_widget
widget_tag = Scrivito::WidgetTag.new(view_context, widget,
render_context: params[:template_name], inner_tag: params[:inner_tag])
- render text: widget_tag.render, layout: false
+ render plain: widget_tag.render, layout: false
end
def widget_details
assert_dialog_layout
widget = load_widget
@@ -166,10 +168,10 @@
def deliver_file
if binary = @obj.binary
binary_routing = BinaryRouting.new(request, scrivito_engine)
redirect_to binary_routing.resolved_binary_obj_url(@obj, binary)
else
- render text: 'Empty Blob', status: 404
+ render plain: 'Empty Blob', status: 404
end
end
def assert_dialog_layout
view_context.lookup_context.find('layouts/scrivito_dialog')