Mr Marnen! Been thinking about this today and I see now that my aversion to block arguments was unfounded.
I think I probably went off on a tangent since I have never really needed this when defining my factories, and I was always irked that I was being forced to use a block by my factory of choice (FG) for something as simple as some string substitutions. Rather whenever I have needed more complex code to generate the attribute it has been something that I have needed across multiple factories where a shared function has been more appropriate, and this I have often found less than intuitive to achieve with FG. So this background has been reflected in my choice of syntax here, which makes it very easy/clear how to share helper methods across factories and dispenses with the need for a block when a simple string substitution will do. That being said I can see now that for the one-off cases being able to use an anonymous function could come in very handy indeed. Anyway I've added the ability to pass in attributes via a block argument to my plugin should anyone find it useful. Who knows I may even use it myself one day. Cheers. -- 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.

