app/controllers/scrivito/objs_controller.rb in scrivito_sdk-1.6.0.rc1 vs app/controllers/scrivito/objs_controller.rb in scrivito_sdk-1.6.0.rc2
- old
+ new
@@ -1,13 +1,9 @@
module Scrivito
class ObjsController < WebserviceController
around_action :require_selected_workspace_write_authorization, only: [
- :destroy,
:restore,
- :restore_widget,
- :revert,
- :revert_widget,
]
before_filter :require_identical_selected_and_visible_workspace, only: [
:page_class_selection,
:widget_class_selection,
@@ -24,42 +20,12 @@
def details
assert_dialog_layout
render current_obj.details_view_path, layout: 'scrivito_dialog', formats: :html
end
- def destroy
- in_selected_workspace do
- parent = current_obj.parent
- @redirect_to = parent ? scrivito_path(parent) : "/"
- current_obj.destroy
- end
- end
-
- def revert
- in_selected_workspace { current_obj.revert }
- render_empty_json
- end
-
- def revert_widget
- in_selected_workspace { current_widget.revert }
- render_empty_json
- end
-
def restore
in_selected_workspace { Obj.restore(params[:id]) }
render_empty_json
- end
-
- def restore_widget
- in_selected_workspace { current_obj.restore_widget(params[:widget_id]) }
- render_empty_json
- end
-
- def binary_no_cache
- in_selected_workspace do
- binary = current_obj[params[:attribute_name]]
- @no_cache_url = binary.no_cache_url
- end
end
def transfer_modifications
in_selected_workspace do
begin