Ginty wrote: Ginty wrote: [...] > def user > # Define attributes via a hash, generate the values any way you want > define :name => "Jimmy", > # An 'n' counter method is available to help make things > unique > :email => "jimmy#[email protected]",
I just realized something else. Because you're not passing a block here, your counter method is useless -- the variable interpolations in that string will only be done once, and every call of the factory thereafter will set email to "[email protected]". There is *no possible way* for this syntax to work as you intended. The *only* way to get this to work is with a block (or with eval, but that's silly). In other words, your aversion to blocks as arguments appears to be breaking your software. Best, -- Marnen Laibow-Koser http://www.marnen.org [email protected] -- Posted via http://www.ruby-forum.com/. -- 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.

