RJS not working?


#1

I’ve been attempting to add a simple rjs ‘delete’ method to my
project. However, no matter what I try, it simply doesn’t work. Even
the easy, easy stuff seems broken. (Yes, <%=
javascript_include_tag :defaults %> is being included in the template.)

For example, from:
http://www.codyfauser.com/articles/2005/11/20/rails-rjs-templates

VIEW:

RJS Template Test



  • Dog

  • Cat

  • Mouse


<%= link_to_remote(“Add a fox”, :url =>{ :action => :add }) %>

CONTROLLER:
def add
end

RJS:
page.insert_html :bottom, ‘list’, content_tag(“li”, “Fox”)
page.visual_effect :highlight, ‘list’, :duration => 3
page.replace_html ‘header’, ‘RJS Template Test Complete!’

results in nothing.

Any insights?

  • josh

#2

Are you running on Edge rails or have the RJS plugin installed? It’s
not built into Rails yet.

-PJ
http://pjhyett.com


#3

On Sun, Dec 25, 2005 at 11:10:24AM -0800, Joshua Paul wrote:

    RJS: page.insert_html :bottom, 'list', content_tag("li", "Fox") page.visual_effect :highlight, 'list', :duration => 3 page.replace_html 'header', 'RJS Template Test Complete!'

    results in nothing.

    Any insights?

Are you using codyfauser’s rjs plugin with rails 1.0 or the code in edge
rails?

marcel