polyglot/app/controllers/application_controller.rb

14 lines
356 B
Ruby
Raw Normal View History

class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
2018-08-28 13:46:15 +00:00
# before_action :authenticate_user!
protect_from_forgery unless: -> { request.format.json? } # Only accept json
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
end