On Nov 27, 2012, at 12:54 AM, nikhil rn wrote:
> Jim,
> I have removed the prototype.js file from app/assets/javascripts
> folder. I will look into the link which you have posted.
>
> Thanks,
>
> Nikhil
The script that you posted originally was written using Prototype conventions, not jQuery. If you substitute jQuery for Prototype, you also need to alter your code to be jQuery-compliant.
Now if you have more Prototype than jQuery in your hand-written code, you can make Rails use Prototype in place of jQuery for all of its core unobtrusive functions (:remote => true and so forth). Just make sure you have the proper (prototype) version of rails.js in your project, and only include prototype.js (not both prototype.js and jquery.js) in your application.html.erb template. Make a scratch Rails project with:
rails new foo -j=prototype
Have a look in that project for the relevant files.
Walter
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment