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.

This project is archived and is in readonly mode.

Adding Proc support on validation messages

#3514

Things like I18n.t and Time.now in the models within validation messages get cached on application load. Support proc helps things a bit.

Patch attached for 2-3-stable.

Reported by Kieran P · November 27th, 2009 @ 01:29 AM

State: committed
Milestone: none
Assigned to: José Valim José Valim
Importance: none

Activity

  1. Kieran P
    Kieran P
    • Tag changed from message, proc, validations to bug, bugmash, message, proc, validations

    January 11th, 2010 @ 08:39 PM

  2. Lenary
    Lenary
    • Tag changed from bug, bugmash, message, proc, validations to bug, bugmash, message, patch, proc, validations

    I think the following patch should apply to rails 3, on top of commit afd0c06dfa

    I have altered the message to put more emphasis on the fact that this makes it dynamic, rather than allows us to use I18n, as now I18n is possible using activemodel validations.

    January 17th, 2010 @ 11:25 AM

  3. José Valim
    José Valim
    • State changed from new to open
    • Assigned user set to José Valim

    January 17th, 2010 @ 01:12 PM

  4. Repository
    Repository

    (from [31ea83eb898786f853bd7ce7075986fa120f949d]) Adding Proc support to validation messages so that they can become a little more dynamic, allowing for customisations during the request [#3514 status:resolved].

    Signed-off-by: José Valim jose.valim@gmail.com
    http://github.com/rails/rails/commit/31ea83eb898786f853bd7ce7075986...

    January 17th, 2010 @ 01:56 PM

  5. José Valim
    José Valim
    • State changed from open to committed

    January 17th, 2010 @ 01:59 PM