I''m a bit confused on how to write a simple form. But not a form_tag and not using RESTful. I would like to be able to design without RESTful design. I''ve used it a bit but don''t see the point. It''s complicating things, at least for me. -- Posted via http://www.ruby-forum.com/.
2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > I''m a bit confused on how to write a simple form. But not a form_tag and > not using RESTful.form_tag _is_ the way to do a simple form. What do you want to do that form_tag does not do (or what does it do that you do not want it to)? Are you confusing it with form_for? Colin> > I would like to be able to design without RESTful design. I''ve used it a > bit but don''t see the point. It''s complicating things, at least for me. > -- > Posted via http://www.ruby-forum.com/. > > > >
Colin Law wrote:> 2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >> >> I''m a bit confused on how to write a simple form. But not a form_tag and >> not using RESTful. > > form_tag _is_ the way to do a simple form. What do you want to do > that form_tag does not do (or what does it do that you do not want it > to)? Are you confusing it with form_for? > > ColinYes. How do I write it forms that is not RESTful? I mean not form_tag. I still want to bind a form to an object. How do I write this in a non-restful way? <% form_for :article, @article, :url => { :action => "create" }, :html => {:class => "nifty_form"} do |f| %> Is it: <% form_for :action => "create" %> <%= text_field "model", "test" %> <% end %> -- Posted via http://www.ruby-forum.com/.
2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Colin Law wrote: >> 2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: >>> >>> I''m a bit confused on how to write a simple form. But not a form_tag and >>> not using RESTful. >> >> form_tag _is_ the way to do a simple form. What do you want to do >> that form_tag does not do (or what does it do that you do not want it >> to)? Are you confusing it with form_for? >> >> Colin > > Yes. How do I write it forms that is not RESTful? I mean not form_tag. I > still want to bind a form to an object. How do I write this in a > non-restful way? > > <% form_for :article, @article, :url => { :action => "create" }, :html > => {:class => "nifty_form"} do |f| %>What do you mean by not RESTful? What does the above do or not for you that is not what you want? Colin> > Is it: > > <% form_for :action => "create" %> > <%= text_field "model", "test" %> > <% end %>
Colin Law wrote:> 2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > > What do you mean by not RESTful? What does the above do or not for > you that is not what you want? > > ColinNot sure :-) I thought it was. I guess I''ll use a regular form_tag then. -- Posted via http://www.ruby-forum.com/.
2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>:> > Colin Law wrote: >> 2009/10/13 Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>: > >> >> >> What do you mean by not RESTful? What does the above do or not for >> you that is not what you want? >> >> Colin > > Not sure :-) I thought it was. I guess I''ll use a regular form_tag then.I still don''t understand why you can''t use form_for if you have an object that the form is bound to, that is exactly what form_for does. Colin