Sha256: 75dc9bcd44317356ccaa708017f31eabef74ec925aa8870cf21afd55f391f26b
Contents?: true
Size: 410 Bytes
Versions: 3
Compression:
Stored size: 410 Bytes
Contents
class ApplicationController < ::ActionController::Base protect_from_forgery with: :exception helper_method :current_user, :signed_in? helper_method :warden, :posts def current_user warden.user end def signed_in? !warden.user.nil? end def posts @posts ||= Post.all end protected def authenticate! warden.authenticate! end def warden env['warden'] end end
Version data entries
3 entries across 3 versions & 1 rubygems