lib/grape/exceptions/base.rb in grape-0.6.1 vs lib/grape/exceptions/base.rb in grape-0.7.0
- old
+ new
@@ -1,9 +1,8 @@
module Grape
module Exceptions
class Base < StandardError
-
BASE_MESSAGES_KEY = 'grape.errors.messages'
BASE_ATTRIBUTES_KEY = 'grape.errors.attributes'
FALLBACK_LOCALE = :en
attr_reader :status, :message, :headers
@@ -60,9 +59,8 @@
def translate(key, options = {})
message = ::I18n.translate(key, options)
message.present? ? message : ::I18n.translate(key, options.merge(locale: FALLBACK_LOCALE))
end
-
end
end
end