Agreed. This would be a useful addition. While we're on the topic, what solution for setters does this naturally work with? We can't just discard the original value that came from the user in case we need to display it again.
-bd On May 30, 10:46 pm, "Derrick Spell" <[EMAIL PROTECTED]> wrote: > On 5/25/07, Steven A Bristol <[EMAIL PROTECTED]> wrote: > > > > > > > > On May 24, 2007, at 10:22 PM, Nik Wakelin wrote: > > > > > How about this for a solution. > > > > > The real problem seems to be that people want to format > > attributes > > > > before they display them (credit card, phone number). So, > > how about we > > > > allow that. Could be as simple as: > > > > > <%= text_field :person, :name, :formatter => :random -%> > > > +1 > > > I would love for this to be in core. I have been feeling the pain of > > hacking around this for sometime. > > > Nik, will you do the patch or should I? > > > Koz, do you think this would be applied? > > > -- > > Thank you, > > Steven A Bristol > > [EMAIL PROTECTED] > > Here's another +1 on being able to format the value in a form helper > before it's displayed. This shouldn't be in my model since it's > purely a display issue. I'd be happy if I could specify another > helper method to perform the formatting. Something like: > > <%= text_field :product, :price, :formatter => :number_to_currency -%> > > -Derrick Spell --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
