On Mon, 30 Jul 2007, Bahadr Do~_an wrote:
>
> Hello,
>
> I want to prepare fixtures to insert into the table. but one column
> needs to be calculated before inserting. For example, the password field
> must be recorded as MD5(password) (MD5 of password). how can i do this?
Fixtures accept ERB templating syntax so you can put your
calculations as ruby code between <%= ... %> etc. See the recent
thread about my problems using ERB which were actually due to bugs
in my expanded code.
HTH
Hugh
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---