[Rails] JQuery+AJAX partial in form_for
Hi! I want to render partial which depends on form builder "f". How can
I do it using AJAX+JQuery
Files
#new.html.haml
%h1
New order
- form_for(@order) do |f|
= f.error_messages
%div#partial
= render "#{@order.current_step}_step", :f => f
#create.js.erb
$("#partial").empty();
$("#partial").append
( <%= render "#{@order.current_step}_step", :locals => {:f=>f}%>);
The error
undefined local variable or method `f' for ActionView::Base
--
Posted via http://www.ruby-forum.com/.
--
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home