lib/scrivito/controller_actions.rb in scrivito_sdk-0.90.0 vs lib/scrivito/controller_actions.rb in scrivito_sdk-1.0.0.rc1
- old
+ new
@@ -81,11 +81,11 @@
# This method is _not_ called if Rails is in the +development+ or +test+ environment.
# In those environments, all widget errors are just raised.
#
# @param widget [Scrivito::BasicWidget] the flawed widget
# @param error [StandardError] the error that occurred
- # @raise [StandardError] if this method is not overridden, the +error+ passed to it
+ # @raise [StandardError] if this method is not overridden, the +error+ passed to it
# is reraised.
#
# @example Notify external service about widget error and render an HTML placeholder:
# def on_scrivito_widget_error(widget, error)
# # Report error to external service (e.g. Honeybadger or Airbrake):
@@ -131,10 +131,9 @@
def comparison
editing_context.comparison
end
def load_object
- CmsEnv.new(request.env).load
loaded_obj = request.env[CmsEnv::OBJ_ENV_KEY]
raise loaded_obj if loaded_obj.is_a?(StandardError)
@obj = loaded_obj
end