lib/action_controller/responder.rb in responders-2.3.0 vs lib/action_controller/responder.rb in responders-2.4.0
- old
+ new
@@ -198,11 +198,11 @@
# This is the common behavior for formats associated with browsing, like :html, :iphone and so forth.
def navigation_behavior(error)
if get?
raise error
elsif has_errors? && default_action
- render :action => default_action
+ render rendering_options
else
redirect_to navigation_location
end
end
@@ -294,8 +294,16 @@
{:errors => resource.errors}
end
def response_overridden?
@default_response.present?
+ end
+
+ def rendering_options
+ if options[:render]
+ options[:render]
+ else
+ { action: default_action }
+ end
end
end
end