I'm trying to add Raty to my rails 4 app, but was wondering where I need to put it. I'm assuming the lib folder just needs to be put into this path?
vendor/assets/javascripts
And then to use the script I just do <%= javascript_include_tag 'vendor/assets/javascripts/jquery.raty' %>
in my files? I want to be able to use it on multiple pages. Also, can I use the script in .erb files or only regular html? Completely new to this so any help is appreciated, thank you.
You can download the plugin and save it in vendor/assets/javascripts
. Then you include it on application.js
:
//= require jquery.raty
This way the plugin is available throughout your application. The minified version of the plugin is about 8.3Kb.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With