module Roqua::Responders::ActiveInteractionAwareResponder
Public Instance Methods
json_resource_errors()
click to toggle source
Calls superclass method
# File lib/roqua/responders/active_interaction_aware_responder.rb, line 16 def json_resource_errors if !resource.is_a?(ActiveInteraction::Base) || resource.errors.empty? super else {:errors => resource.errors.as_json} end end
to_format()
click to toggle source
Calls superclass method
# File lib/roqua/responders/active_interaction_aware_responder.rb, line 6 def to_format if resource.is_a?(ActiveInteraction::Base) if resource.errors.empty? @resource = resource.result @resources[-1] = resource end end super end