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.
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.
2009/10/13 Pål Bergström [email protected]:
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
Colin L. wrote:
2009/10/13 Pål Bergström [email protected]:
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| %>
Is it:
<% form_for :action => “create” %>
<%= text_field “model”, “test” %>
<% end %>
2009/10/13 Pål Bergström [email protected]:
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
2009/10/13 Pål Bergström [email protected]:
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
Colin L. wrote:
2009/10/13 Pål Bergström [email protected]:
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs