Ruby Forum Ruby on Rails > submit form in database

Posted by Manika Suri (mani)
on 05.05.2008 10:15
Attachment: classified_controller.rb (371 Bytes)
Hi I created A folder book and created a database mysql.now I create a
form new.rhtml.now I am running it it is not submitting data in database
can u tell me what is problem what should I chang
this is my new.rhtml file

<% form_for :classified do |f| %>
<p>
Title:<br />
<%= f.text_field :title %>
</p>
<p>
price:<br />
<%= f.text_field :price %>
</p>
<p>Location:<br/>
<%=f.text_field:location%>
</p>
<p>Description:<br/>
<%=f.text_area:description%>
</p>
<p>Email:<br/>
<%=f.text_field:email%>
</p>

<p>
<%=submit_tag%>
</p>
<%end%>
and controller is an attechment
it's urgent
thanks
Posted by Thorsten Mueller (thorsten)
on 05.05.2008 10:54
the form code looks ok.
maybe the problem is in the routing or the controller.
could be the model too, if you use validations that may fail.

does the action in the controller get called?
does it get the params with form data?