<% form_for :todo,:url
=>todos_path,:html=>{:name=>"new_todo"} do |f|
%>
<p>
<label>
Title
</label>
<%= f.text_field :title,:class=>"validate[required,length
[5,8]] text-input" %>
</p>
<p>
<label>
Description
</label>
<%= f.text_area :description,:rows=>"4" %>
</p>
<p>
<label>
Assign to
</label>
<%= select("todo","user_id",@users.map {|u|
[u.login,u.id] }) %>
</p>
<%=f.hidden_field :assigned_by,:value=>current_user.id
%>
<%= submit_to_remote ''create_btn'',
''Create'', :url => { :action =>
''new'' } %>
<% end %>
any suggestions about this code
please let me know what is the error of this code.
Hi Nirosh, On Thu, 2009-08-06 at 11:46 -0700, nirosh wrote:> <% form_for :todo,:url =>todos_path,:html=>{:name=>"new_todo"} do |f| > %>You need to use form_remote_for(... HTH, Bill> <p> > <label> > Title > </label> > <%= f.text_field :title,:class=>"validate[required,length > [5,8]] text-input" %> > </p> > <p> > <label> > Description > </label> > <%= f.text_area :description,:rows=>"4" %> > </p> > <p> > <label> > Assign to > </label> > <%= select("todo","user_id",@users.map {|u| > [u.login,u.id] }) %> > </p> > <%=f.hidden_field :assigned_by,:value=>current_user.id > %> > <%= submit_to_remote ''create_btn'', ''Create'', :url => { :action => > ''new'' } %> > <% end %> > > > > any suggestions about this code > please let me know what is the error of this code. > > > > > > > > > > >