You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
370 B

8 years ago
8 years ago
  1. class ApplicationController < ActionController::Base
  2. # Prevent CSRF attacks by raising an exception.
  3. # For APIs, you may want to use :null_session instead.
  4. protect_from_forgery with: :exception
  5. # Profiling
  6. before_action do
  7. if (current_user && current_user.admin?) || Rails.env == 'development'
  8. Rack::MiniProfiler.authorize_request
  9. end
  10. end
  11. end