Sha256: dab6da373433f519eb13ad490b9fb684f66a7f71865e5cb0297ecd2c2166ceed

Contents?: true

Size: 493 Bytes

Versions: 2

Compression:

Stored size: 493 Bytes

Contents

# module ActionController
#   class Base

#     helper_method :current_user
#     helper_method :user_signed_in?

#     def user_signed_in?
#       session[:user_id].present?
#     end

#     def sign_in_as(user)
#       @current_user = user
#       session[:user_id] = user.try(:id)
#       user
#     end

#     def sign_out
#       sign_in_as nil
#     end

#     def current_user(klass = User)
#       @current_user ||= klass.send(:find_by, id: session[:user_id])
#     end

#   end
# end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ez-0.9.0 lib/ez/controller.rb
ez-0.8.7 lib/ez/controller.rb