Skip to content

Commit

Permalink
Don't include extras in the response
Browse files Browse the repository at this point in the history
  • Loading branch information
Sutto committed Jun 9, 2012
1 parent 220d015 commit 8324474
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/rocket_pants/controller/error_handling.rb
Expand Up @@ -55,7 +55,8 @@ def lookup_error_message(exception)
# TODO: Add in notification hooks for non-standard exceptions.
name = lookup_error_name(exception)
message = (exception.message == exception.class.name) ? 'An unknown error has occurred.' : exception.message
I18n.t name, lookup_error_context(exception).reverse_merge(:scope => :"rocket_pants.errors", :default => message)
context = lookup_error_context(exception).reverse_merge(:scope => :"rocket_pants.errors", :default => message)
I18n.t name, context.except(:extra)
end

# Lookup error name will automatically handle translating errors to a
Expand Down

0 comments on commit 8324474

Please sign in to comment.