Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

full_messages format customization

#11

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}}


Reported by Maxim Kulkin · March 15th, 2009 @ 04:55 PM

State: new
Milestone: none
Assigned to: nobody

Activity

  1. Dmitry Polushkin
    Dmitry Polushkin

    Any news on this ticket?

    July 29th, 2009 @ 12:20 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.