Add rails-ajax in your
Then install it:
<%= render :partial => 'menu' %><%= flash[:notice] %><%= flash[:error] %><%= flash[:alert] %><%= yield %>
//= require jquery //= require jquery_ujs // // RailsAjax //= require jquery.history //= require jquery.rails-ajax //= require RailsAjax-Config //
Controllers can use the refresh_dom_with_partial method to specify a CSS selector to be updated with some partial name:
class HomeController < ApplicationController def login # Refresh the menu in the layout refresh_dom_with_partial('div#Menu', 'menu') # Continue with the default rendering end end
Contributions, questions, jokes? Send them to Muriel!