The code powering m.abunchtell.com https://m.abunchtell.com
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

23 linhas
546 B

  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. force_ssl if: "Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'"
  6. # Profiling
  7. before_action do
  8. if (current_user && current_user.admin?) || Rails.env.development?
  9. Rack::MiniProfiler.authorize_request
  10. end
  11. end
  12. helper_method :current_account
  13. protected
  14. def current_account
  15. current_user.try(:account)
  16. end
  17. end