Skip to content

Commit

Permalink
add back message key in order to have error_codes
Browse files Browse the repository at this point in the history
  • Loading branch information
mkou committed Apr 19, 2016
1 parent 0331563 commit 9d57238
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/grape/exceptions/validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Validation < Grape::Exceptions::Base
def initialize(args = {})
fail 'Params are missing:' unless args.key? :params
@params = args[:params]
@message_key = args[:message] if args.key?(:message) && args[:message].is_a?(Symbol)
args[:message] = translate_message(args[:message]) if args.key? :message
super
end
Expand Down

0 comments on commit 9d57238

Please sign in to comment.