Sha256: 2f13c5df2e2130abce1141adcb076c2cd7c03720a25d8ea004f52f560d81ee78
Contents?: true
Size: 422 Bytes
Versions: 11
Compression:
Stored size: 422 Bytes
Contents
module TkhAuthenticationHelper def self.included(base) base.send(:include, InstanceMethods) # base.before_filter :current_user # base.after_filter :my_method_2 end module InstanceMethods # duplicated it from action controller extension. there must be a better way def current_user @current_user ||= User.find_by_auth_token!(cookies[:auth_token]) if cookies[:auth_token] end end end
Version data entries
11 entries across 11 versions & 1 rubygems