views:

32

answers:

1

rails 3.0

 <% link_to about_path, :remote => true do %>
        About Us<span>Who we are</span>
  <% end %>


  def about
    render :update do |page|
      page[:content].replace_html :partial => 'dashboard/about'
    end
  end

Having issues with AJAX in rails 3.0 Just trying to get it replace the html with a partial one clicked. Any help is greatly appreciated. I am trying to use the new :remote=>true that was implemented in rails 3.0.

Thanks

UPDATE: Below is the markup I get. Also when I click it, I go to a new screen with a bunch of text and white background. Thanks again.

<a href="/about" data-remote="true">                About Us<span>Who we are</span> 
</a>

Even when trying a basic example of ajax.

Hello there
<%= link_to 'something, something_path, :remote=true %> 

controller:

def something 
render :update do |page|
page[test].visual_effect :blind_up
end
A: 

Great Post on an example of using Rails3 + CRUD + UJS.

http://www.stjhimy.com/posts/7

RoR