Sorry for the long explanation but I’m having trouble integrating rjs
into my
form page. Here’s my page:
- <%= render :partial => 'list_results', :collection =>
@posts %>
<%= link_to_remote('+', :url => {:action => 'new'}, :update => 'new_post', :loading => visual_effect(:slide_down, "new_post", :duration => 0.5)) %>
This works fine and the form is rendered inside “new_post” from the
controller using render :partial => ‘edit_new’, :layout => false
_edit_new is as follows:
<%= form_remote_tag(:url => {:action => ‘create’, :id => @post}) %>
subject:
<%= text_field(:post, :subject, :width => 60) %>
message:
<%= text_area(:post, :content, :rows => 15, :cols => 60) %>
<%= submit_tag('add now') %>
<%= end_form_tag %>Theoretically, create.rjs is used to render this, and indeed a
logger.debug
shows that to be true. Here’s create.rjs:
logger.debug ‘writing rjs’
page.insert_html :top, ‘post_list’, :partial => ‘list_results’, :locals
=> {
:list_results => @post }
page.visual_effect :highlight, ‘post_list’
Nothing happens! Of course I know this is one of the tough parts about
rjs,
but is there anything obvious that I’m missing?
Thanks
–
View this message in context:
http://www.nabble.com/rjs-in-multiple-ajax-page-t1488869.html#a4033679
Sent from the RubyOnRails Users forum at Nabble.com.