initial commit

This commit is contained in:
Mo Bitar
2016-12-05 17:33:27 -06:00
commit c6ab2f4122
146 changed files with 6185 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
class ApplicationController < ActionController::Base
include DeviseTokenAuth::Concerns::SetUserByToken
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :null_session
after_action :set_csrf_cookie
layout :false
def frontend
set_app_domain
end
rescue_from ActionView::MissingTemplate do |exception|
end
protected
def set_app_domain
@appDomain = request.domain
@appDomain << ':' + request.port.to_s unless request.port.blank?
end
def set_csrf_cookie
cookies['XSRF-TOKEN'] = form_authenticity_token if protect_against_forgery?
end
end