Hi I have <button type="submit" class="class1"><span>Create </span></button> Could anybody say get the same above using railshelper I tried f.submit "Create",:class => ''class1'' But not correct Thanks Tom -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
2010/1/25 Tom Mac <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>:> Hi > I have > <button type="submit" class="class1"><span>Create </span></button> > > Could anybody say get the same above using railshelper I tried > > f.submit "Create",:class => ''class1'' But not correctWhat is not correct about it? What does it generate? If you get an error show us the code around it. Colin> > Thanks > Tom > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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. > >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Colin Law wrote:> 2010/1/25 Tom Mac <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >> Hi >> � I have >> <button type="submit" class="class1"><span>Create </span></button>Not an error f.submit creates the html as <input class="class1" id="model_submit" name="commit" type="submit" value="Create" /> But what I need is exactly <button type="submit" class="class1"><span>Create </span></button> If directly use this no problem But what I ould like to know an alternative in railshelper Tom -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Tom Mac wrote:> Colin Law wrote: >> 2010/1/25 Tom Mac <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>: >>> Hi >>> � I have >>> <button type="submit" class="class1"><span>Create </span></button> > > Not an error f.submit creates the html as > <input class="class1" id="model_submit" name="commit" type="submit" > value="Create" /> > > But what I need is exactly > <button type="submit" class="class1"><span>Create </span></button> > > If directly use this no problem But what I ould like to know an > alternative in railshelper > > TomYou also have button_tag but this won''t create an html <button> tag, it does though create a simple form wrapped around an input which means your backend gets a consistent result regardless of the browser (<button> is a bit inconsistent depending on the users browser). -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
> You also have button_tag but this won''t create an html <button> tag, it > does though create a simple form wrapped around an input which means > your backend gets a consistent result regardless of the browser > (<button> is a bit inconsistent depending on the users browser).oops i meant button_to ..... -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Tom Mac wrote:> Hi > I have > <button type="submit" class="class1"><span>Create </span></button> > > Could anybody say get the same above using railshelper I tried > > f.submit "Create",:class => ''class1'' But not correctTry content_tag -- or just write the literal HTML.> > Thanks > TomBest, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Have you tried: :html=>{:id => ''submit'',:class=>''calss1''} On Jan 25, 4:25 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Tom Mac wrote: > > Hi > > I have > > <button type="submit" class="class1"><span>Create </span></button> > > > Could anybody say get the same above using railshelper I tried > > > f.submit "Create",:class => ''class1'' But not correct > > Try content_tag -- or just write the literal HTML. > > > > > Thanks > > Tom > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.
Chris Habgood wrote:> Have you tried: > :html=>{:id => ''submit'',:class=>''calss1''}That won''t do it. The solutions I provided are the only correct ones. Best, -- Marnen Laibow-Koser http://www.marnen.org marnen-sbuyVjPbboAdnm+yROfE0A@public.gmane.org -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
works with my submit_to_remote. On Jan 25, 6:45 pm, Marnen Laibow-Koser <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Chris Habgood wrote: > > Have you tried: > > :html=>{:id => ''submit'',:class=>''calss1''} > > That won''t do it. The solutions I provided are the only correct ones. > > Best, > -- > Marnen Laibow-Koserhttp://www.marnen.org > mar...-sbuyVjPbboAdnm+yROfE0A@public.gmane.org > -- > Posted viahttp://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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@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.