inline RJS

In my previous article I was playing with RJS templates and finding easy way to generate them. Well Thomas just posted some new goodies see http://mir.aculo.us/articles/2006/01/21/new-inline-rjs-for-rails. For quick updates no need to have a separte .rjs file.

class UserController < ApplicationController 
  def refresh 
    render :update do |page| 
      page.replace_html('user_list', 
        :partial => 'user', :collection => @users) 
      page.visual_effect :highlight, 'user_list' 
    end 
  end 
end

Posted by Daniel Wanja Fri, 20 Jan 2006 19:04:00 GMT


Comments

  1. andrew almost 2 years later:

    Handy! That was exactly what I was looking for!

    Thanks.

  2. lubomir.herko@euradallc.com over 2 years later:

    very useful.. thanks