views:

111

answers:

3

I have a legacy app that was built entirely in jQuery and HTML. Does a lot AJAX calls and so forth.

I needed an authentication framework for it, so I wrapped it in a Rails app.

Rails -> does the authentication jQuery/HTML -> all the rest

The problem is that the jQuery stuff doesn't seem to work anymore. All my regular AJAX calls get nothing back from the server.

Does Rails interfere with normal AJAX calls? Is there a way to get it out of the way? i.e. I want to do the authentication, then hand off to the jQuery app and not have any interference.

I don't have the time or patience to turn it into a true Rails app.

(Or is there a better way to do this? I looked at some jQuery/Javascript authentication, but couldn't get my head around it)

A: 

I think that the video at this link would help you: How do you use jQuery with Rails?

True Soft
Ya, but that is a full blown Rails app with jQuery. I just want Rails to get out of the way... :-)
thermans
+6  A: 

Sounds like you don't really want to use Rails. Rails is meant to be a full application framework, and as such will most certainly 'get in your way'.

I'd suggest a simpler framework, something like Sinatra: http://www.sinatrarb.com/

Ben
A: 

The issue is that Rails automatically includes the prototype javascript library which gets in the way of jQuery. A quick solution may be to use jRails which should replace those protoype calls with jquery ones.

Austin Fitzpatrick