Calculated fixtures

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?

On Mon, 30 Jul 2007, Bahadır 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