I want to include this, for example:
jQuery(document).ready(function($) {
$(\'#my-modal\').modal(options)
});
In one specific place in
These are some useful tricks
your.js for your javascript your.js on specific your layout //= require_tree . on application.jsyour.js to asset percompile on config/application.rb : config.assets.precompile += %w( your.js )put your js script with javascript tag on mymodal.html.erb
put your js script into layout/yourlayout.html.erb and use if.. else.. logic.
example :
<% if current_page?(yourspecific_path) %> <% end %>
Read more here about current_page?
Or use request.fullpath to get current full path
example :
<% if request.fullpath == yourspecific_path %> <% end %>
Read more here about request.fullpath
Also you can combine #1 and #3 if you want script put into file .js
cheers