I just cant figure why this doesnt work. Im trying to follow a book
example. Well lets see:
<%=form_remote_tag(:update => "text1", :url => {:action =>
:update})%>
<div class="cap" id="text1"><%=render(:partial
=> "index_text1")%></div>
<%=end_form_tag%>
the partial contains:
<%=text_area(:page, :text1, :cols => "17", :rows=>
"6")%><br/><%=submit_tag("Save")%>
and the controller:
def index
@page = Page.find(:first, :conditions => "page
''index''")
end
def update
render(:partial => "index_text1")
end
When I click submit, the action changes to update and it renders *only*
the partial and not everything else thats on the page. In other words it
behaves like a non-AJAX form. Can anyone help me with what im doing
wrong?
Thanks,
Petr
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---