RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: dhc02
Site: thedcdesign.com
Don't know where in the rails stack this logic is executed, but if there is access to instance variables per request then you could:
Add .erb onto the end of your application.js file => application.js.erb
Do something like:
<% if @current_user.is_admin? %> //= require_tree ./admin <% end %>
Don't know where in the rails stack this logic is executed, but if there is access to instance variables per request then you could:
Add .erb onto the end of your application.js file => application.js.erb
Do something like: