blob: 73de1838cfb1285202bd13fcf15a7b969c29f77b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
force_ssl if: "Rails.env.production? && ENV['LOCAL_HTTPS'] == 'true'"
helper_method :current_account
protected
def current_account
current_user.try(:account)
end
end
|