submit_to_remote fails on rails 2.2.2 and rails 2.3.2 but fully
working with 2.0.2
please give me an answer as soon as possible. its very urgent
the code is
HTML
====
<% form_for :todo, @todo, :url => { :action => "update_todo" } do |f|
%>
<div>
<p>
<label>Todo</label>
<%=f.text_field :name%>
</p>
<p>
<label>Description<label>
<%=f.text_area :description,:rows=>3 %>
</p>
<p>
<label>Due date</label>
<%=f.text_field :due_date,:class=>"date-pick dp-applied" %>
</p>
<p>
<label>Assign to</label>
<%=select("todo", "assign_to",
@project.project_teams.map {|u| [User.find
(u.user_id).full_name,u.user_id]}.uniq)%>
</p>
<p>
<%= submit_to_remote 'create_btn', 'Update',
:url => { :action =>
'update_todo',:id=>@project.id,:todo_id=>@todo.id} %>
</p>
</div>
<%end%>
Controller
============
def update_todo
@todo = Todo.find(params[:todo_id])
@todo.update_attributes(params[:todo])
@todo.save
end
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---