On 17 Aug 2010, at 07:07, lexer wrote:

I want to set up my RoR project to use local javascript library for
development and externally hosted for production (for example jquery
from google). How it could be achieved?

<% if RAILS_ENV="production">
javascript_include_tag "http://somewhere.com/javascript_file_without_js "
<% else %>
   javascript_include_tag "javascript_file_without_js"
<% end %>

http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M002225


Best regards

Peter De Berdt

--
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to