2018-08-27 14:37:06 +00:00
|
|
|
class ApplicationController < ActionController::Base
|
|
|
|
protect_from_forgery with: :exception
|
2018-08-28 13:46:15 +00:00
|
|
|
# before_action :authenticate_user!
|
2018-08-27 18:05:57 +00:00
|
|
|
protect_from_forgery unless: -> { request.format.json? } # Only accept json
|
2018-08-28 16:41:10 +00:00
|
|
|
|
|
|
|
def after_sign_in_path_for(resource)
|
|
|
|
contacts_path
|
|
|
|
end
|
2018-08-31 13:32:14 +00:00
|
|
|
|
|
|
|
def default_url_options
|
|
|
|
{ host: ENV["HOST"] || "localhost:3000" }
|
|
|
|
end
|
2018-08-27 14:37:06 +00:00
|
|
|
end
|