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

 class Person < ActiveRecord::Base

   def random(value)
      value.upcase * 4
   end

 end

Thoughts?

On 5/23/07, Mislav Marohnić <[EMAIL PROTECTED]> wrote:
> On 5/23/07, Nik Wakelin <[EMAIL PROTECTED]> wrote:
> >
> >   1) If an overridden accessor is there, (i.e you've defined
> > Product#price) then that gets called
> >    2) Otherwise, we call price_before_type_cast
>
> That's still no good. You want to be able to display to the user exactly
> what he entered, unconditionally. Doing what you suggested would make the
> behavior even more inconsistent.
>
>
>  >
>


-- 
Nik Wakelin
(027) 424 5433
[EMAIL PROTECTED]

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

Reply via email to