Rails allows customizing error messages for particular attribute
of particular model, but #full_messages return error strings in
form "{{human_attribute_name}} {{message}}".
It would be nice to allow customizing full_message the same way
as error messages are customized: instead of @@@ruby full_messages
<< attr_name + ' ' + message
have something like this:
@@@ruby
defaults = @base.class.self_and_descendents_from_active_record.collect do |klass|
:"models.#{klass.name.underscore}"
end
defaults << "full_error_message"
options = {
:attribute => attr_name,
:message => message,
:default => defaults,
:scope => [:activerecord, :errors]
}
full_message << I18n.t(:full_error_message, options)
This will allow customizing full error message like this:
@@@yaml en: :activerecord
:errors:
:full_error_message: Field "{{attribute}}" {{message}}