Forum: Ruby on Rails jQuery and Rails

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.
7753e83404f3e23723dee2d875b0c3a0?d=identicon&s=25 John Lauck (Guest)
on 2007-05-09 18:28
(Received via mailing list)
Any jQuery users have an example or info regarding their jQuery
integration
to rails apps?

I've found plenty of tutorials and guides on setting up jQuery and doing
some simple UI tasks.  But I'd  really like to compare my strategies of
using jQ's ajax (etc.) in Ruby on Rails applications with other users.

Anyone have any examples?


John
428167a3ec72235ba971162924492609?d=identicon&s=25 Yehuda Katz (wycats)
on 2007-05-09 19:57
(Received via mailing list)
I am a member of the jQuery team, and I am currently finishing up work
on the first release of jQuery on Rails, a plugin for Rails that
replaces the built-in prototype stuff with jQuery.

It's not a 1:1 API rewrite, but rather an attempt to get the jQuery
philosophy of unobtrusive coding into Rails. I will have a release
ready for RailsConf (and I will be there as well).

-- Yehuda Katz
7753e83404f3e23723dee2d875b0c3a0?d=identicon&s=25 John Lauck (Guest)
on 2007-05-09 20:01
(Received via mailing list)
Sounds great Yehuda!  I was just browsing your blog trying to find your
email address.  I look forward to checking out the plugin when it's
released.

Thanks,

John
E3e98bfa99e82ac8b0cb63660dc23b14?d=identicon&s=25 Geoff Buesing (Guest)
on 2007-05-18 02:27
(Received via mailing list)
I just posted about what I've figured out so far regarding JQuery Ajax
+ Rails here: http://mad.ly/2007/05/17/jquery-ajax-rails/

I discuss how to build JQuery Ajax calls that can interact with a
RESTful controller method with a respond_to block (you need to add the
correct Accept header to the HTTP request before you send), and how to
write JQuery Javascript via RJS -- for example:

page["#posts"].append render(:partial => 'post', :locals => {:post =>
@post})

outputs:

$("#posts").append("Post #29 info...");

... which JQuery can parse and execute successfully.

Interested to hear what others have been able to figure out with
JQuery + Rails integration.

Geoff
This topic is locked and can not be replied to.