The code powering m.abunchtell.com https://m.abunchtell.com
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 

23 satır
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