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.

15 lines
384 B

8 years ago
7 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. force_ssl if: "Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'"
  6. helper_method :current_account
  7. protected
  8. def current_account
  9. current_user.try(:account)
  10. end
  11. end