Module ArkanisDevelopment::SimpleLocalization::ExtendedErrorMessages::MessageExtension
In: lib/features/extended_error_messages.rb

Methods

Attributes

prefix_with_attribute  [RW] 

Public Instance methods

[Source]

    # File lib/features/extended_error_messages.rb, line 25
25:       def prefix_with_attribute?
26:         @prefix_with_attribute
27:       end

[Source]

    # File lib/features/extended_error_messages.rb, line 29
29:       def substitute!(base, attribute)
30:         self.replace Language.substitute_entry(self, :model => base.class.localized_model_name) if base.class.respond_to?(:localized_model_name)
31:         self_before_attribute_substitution = self.dup
32:         self.replace Language.substitute_entry(self, :attr => base.class.human_attribute_name(attribute))
33:         self.prefix_with_attribute = true if self == self_before_attribute_substitution
34:       end

[Validate]