Forum: Ruby on Rails RJS not working?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Joshua Paul (Guest)
on 2005-12-25 21:13
(Received via mailing list)
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/rail...

VIEW:
	<h1 id='header'>RJS Template Test</h1>
	<ul id='list'>
	<li>Dog</li>
	<li>Cat</li>
	<li>Mouse</li>
	</ul>
	<%= 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
PJ Hyett (Guest)
on 2005-12-25 21:16
(Received via mailing list)
Are you running on Edge rails or have the RJS plugin installed? It's
not built into Rails yet.

-PJ
http://pjhyett.com
Marcel Molina Jr. (Guest)
on 2005-12-25 21:16
(Received via mailing list)
On Sun, Dec 25, 2005 at 11:10:24AM -0800, Joshua Paul wrote:
> 	<ul id='list'>
> 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
This topic is locked and can not be replied to.