app/controllers/scrivito/objs_controller.rb in scrivito_sdk-0.65.2 vs app/controllers/scrivito/objs_controller.rb in scrivito_sdk-0.66.0.rc1
- old
+ new
@@ -82,15 +82,19 @@
def restore_widget
in_selected_workspace { current_obj.restore_widget(params[:widget_id]) }
render_empty_json
end
- def conflict_warnings
+ def conflicting_workspaces
@workspaces = selected_workspace.conflict_warning_for(params[:id])
render :workspaces
end
+ def is_outdated
+ in_selected_workspace { @is_outdated = current_obj.outdated? }
+ end
+
def mark_resolved
in_selected_workspace { current_obj.mark_resolved }
render_empty_json
end
@@ -168,10 +172,10 @@
helper_method :current_widget
def load_widget
raise ScrivitoError, 'no widget_id param specified' if params[:widget_id].blank?
unless @widget = current_obj.widget_from_pool(params[:widget_id])
- raise ScrivitoError, "widget with ID '#{params[:widget_id]}' not found"
+ raise ResourceNotFound, "widget with ID '#{params[:widget_id]}' not found"
end
@widget
end
def copy_obj(obj, parent_path)