Sha256: b7d6aea322e3014b5a5d8f4607a41854aec44bd82289f37b5d2c1d52060f5de5
Contents?: true
Size: 720 Bytes
Versions: 1
Compression:
Stored size: 720 Bytes
Contents
require "base_controller.rb" class ApplicationController < BaseController # Prevent CSRF attacks by raising an exception. # For APIs, you may want to use :null_session instead. protect_from_forgery :with => :exception # global requires $LOAD_PATH << File.join(File.dirname(__FILE__), "../../../../../lib") # use authentication based on "devise" #before_filter :authenticate_user! include Devise::Controllers::Helpers before_filter do fail "bad ancestor" unless self.kind_of?(Devise::Controllers::Helpers) fail "no mapping" unless Devise.class_variable_get(:@@mappings)[:user] authenticate_user! end #acts_as_token_authentication_handler_for User, :fallback_to_devise => false end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cloud-toaster-1.1.6 | webapp/app/controllers/application_controller.rb |