I hate to say this again, but I'm working on a major Rails/jQuery project that's shipping this week. When that's done, I'm going to extract out the goodies from the project and make it jQuery on Rails. I know it's been a while, but this project has taken precedence over my jQuery work for a month or so. Hopefully I will have time for jQuery stuff starting next week.
-- Yehuda
<div><span class="gmail_quote">On 12/14/06, <b class="gmail_sendername">Klaus Hartl</b> <<a href="mailto:klaus.hartl@stilbuero.de">
klaus.hartl@stilbuero.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Abdur-Rahman Advany schrieb:
> HI,
>
> Currently I am using Rails and JQuery combined with Minus_r (a plugin by
> Dann Web).
>
> But rails requires that you send the correct accept header to make
> respond_to work. So you need to adjust your ajax method (inside of
> jquery) with a few lines extra:
>
> // Set Accept header based on dataType
> if ( s.dataType == 'script' || s.dataType == 'json' )
> xml.setRequestHeader("Accept", "text/javascript, text/html,
> application/xml, text/xml, */*");
>
> if ( s.dataType == 'xml' )
> xml.setRequestHeader("Accept", "application/xml, text/xml, text/html,
> text/javascript */*");
>
> and when you are using one of the methods or plugins that allow you to
> set dataType just specify 'script' and rails wil respond_to :js(thus
> making RJS work with minus_r).
>
> You will need minus_r as rails default way of handling .rjs is to
> evaluate it as ruby and not ERB.
>
> Greets,
>
> Abdul
>
> Klaus Hartl wrote:
>> Hi all,
>>
>> can someone share his experience of using jQuery with Rails? We are
>> switching to Rails at Plazes but I'd like to stay in the jQuery camp :-)
>>
>>
>> Thanks,
>>
>> Klaus
Thanks Abdul for the information. I was thinking of using the Minus_r
plugin. Good to have some tips to start with!
Yehuda, what about jQuery on Rails?
-- Klaus
_______________________________________________
jQuery mailing list
<a href="mailto:discuss@jquery.com">
discuss@jquery.com</a>
<a href="http://jquery.com/discuss/">
http://jquery.com/discuss/</a></blockquote>
</div>
<br clear="all">
--
Yehuda Katz
Web Developer | Wycats Designs
(ph) 718.877.1325
_______________________________________________
jQuery mailing list
discuss@jquery.comhttp://jquery.com/discuss/