sms-pager/app/controllers/application_controller.rb

15 lines
378 B
Ruby
Raw Normal View History

2015-09-12 15:37:05 -05:00
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
2015-10-20 21:49:59 -05:00
before_action :require_login
2015-09-18 15:50:52 -05:00
respond_to :html, :json
2015-10-19 22:05:48 -05:00
helper :access
2015-10-19 22:05:28 -05:00
private
def not_authenticated
redirect_to :root, alert: "Please login first."
end
2015-09-12 15:37:05 -05:00
end