Re: [Rails] Re: Using form_for inside a helper

2010-11-27 Thread Rob Lacey
Without opening a debate on the issue. I find the whole bad form, conventions as interesting as it is frustrating. I need to re-use this button helper in many views several times over for several different buttons. Say... <%= button_helper(:fruit) %> <%= button_helper(:fungi) %> <%= button_helper(

Re: [Rails] Re: Using form_for inside a helper

2010-11-27 Thread Colin Law
On 27 November 2010 09:16, Rob Lacey wrote: > I'm judging from your response that you would you argue that using a > Rails view helper inside another view helper is wrong then? I would > say this isn't crazy its just trying to DRY up a small form (just a > button) I am using in lots of different p

Re: [Rails] Re: Using form_for inside a helper

2010-11-27 Thread Rob Lacey
I'm judging from your response that you would you argue that using a Rails view helper inside another view helper is wrong then? I would say this isn't crazy its just trying to DRY up a small form (just a button) I am using in lots of different places. I found the solution in the end. module MyHe

[Rails] Re: Using form_for inside a helper

2010-11-27 Thread Robert Pankowecki (rupert)
You might wanna consider creating your own form builder instead putting into helpers. Look at formtastic gem as an example. Robert Pankowecki http://robert.pankowecki.pl -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this gro

[Rails] Re: Using form_for inside a helper

2010-11-26 Thread daze
Whoa whoa whoa. form_for is for the VIEW. It generates html. Specifcally, it generates tags and etc... On Nov 26, 2:35 pm, RobL wrote: > Hi there, > > I'm having an awful lot of trouble trying to use form_for inside a > helper. Any ideas how to get this to work? > > module MyHelper > >    def