> i know data type changes to the corresponding ruby one when reading
> data from database,but wonder how it changes when writing data to
> database.
> for example,if there is a new answer (
> answer=Answer.new(params[:answer]) ),it will be validated,and saved to
> database,but how does the attribute value's datatype change during this
> process?it is always string type until be saved to database?
> 
> i use rails3 active_model's new feature,really want to know the above?
> can you help me?

Dig through the source... I would imagine it would be in active record (or 
whatever ORM you use) not in active model... look for "type cast"...

-phiilp

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en.

Reply via email to