Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Donnie Clapp's Profile

GitHub User: dhc02

Site: thedcdesign.com

Comments by Donnie Clapp

Avatar

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:

  1. Add .erb onto the end of your application.js file => application.js.erb

  2. Do something like:

ruby
<% if @current_user.is_admin? %>
//= require_tree ./admin
<% end %>