Class: ActiveModel::Errors
- Inherits:
-
Object
- Object
- ActiveModel::Errors
- Defined in:
- lib/activemodel/error_messages_without_attributes.rb
Instance Method Summary collapse
-
#full_message(attribute, message) ⇒ Object
if the error message starts with “^”, then don’t prepend the attribute name.
- #original_full_message ⇒ Object
Instance Method Details
#full_message(attribute, message) ⇒ Object
if the error message starts with “^”, then don’t prepend the attribute name
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/activemodel/error_messages_without_attributes.rb', line 11 def (attribute, ) return if attribute == :base if =~ /\A\^/ I18n.t(:"errors.format.full_message", { default: "%{message}", message: [1..-1] }) else (attribute, ) end end |
#original_full_message ⇒ Object
8 |
# File 'lib/activemodel/error_messages_without_attributes.rb', line 8 alias_method :original_full_message, :full_message |