Sha256: 920a0031717d8c3959644618ad78c199b5e05089159f58bb7142bec707519aa9
Contents?: true
Size: 490 Bytes
Versions: 1
Compression:
Stored size: 490 Bytes
Contents
class ApplicationController < ActionController::Base protect_from_forgery with: :exception helper_method :current_identity, :identity_signed_in?, :warden_message protected def current_identity warden.user(scope: :identity) end def identity_signed_in? warden.authenticate?(scope: :identity) end def authenticate! redirect_to root_path, notice: t('.not_logged') unless identity_signed_in? end def warden_message warden.message end def warden request.env['warden'] end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mac_generators-0.3.1 | test/dummy/tmp/app/controllers/application_controller.rb |