module Roqua::Responders::ApiErrorsResponder
Public Instance Methods
json_resource_class_name()
click to toggle source
# File lib/roqua/responders/api_errors_responder.rb, line 14 def json_resource_class_name # TODO: Break backwards compat and return "response => " instead underscored = resource.class.name.underscore case underscored when "response" "answer" else underscored end end
json_resource_errors()
click to toggle source
# File lib/roqua/responders/api_errors_responder.rb, line 10 def json_resource_errors {:errors => {json_resource_class_name => resource.errors}} end