sms-pager/app/controllers/application_controller.rb

14 lines
361 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-19 22:05:28 -05:00
before_filter :require_login
2015-09-18 15:50:52 -05:00
respond_to :html, :json
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