Sha256: 61e4ed054113a8e0d8d974b722492cac1f4638f8fe13c2bc3aae3cd69f2a0f00
Contents?: true
Size: 588 Bytes
Versions: 11
Compression:
Stored size: 588 Bytes
Contents
class ApplicationController < ActionController::API def current_user # DETERMINATOR: This would return a User object in most applications # http://guides.rubyonrails.org/action_controller_overview.html#accessing-the-session nil end def guid session[:guid] ||= SecureRandom.uuid end def determinator # DETERMINATOR: A memoized instance of the ActorControl helper class # which allows simple use throughout the app @_determinator ||= Determinator.instance.for_actor( id: current_user && current_user.id || nil, guid: guid ) end end
Version data entries
11 entries across 11 versions & 1 rubygems