Hey guys,
I was wondering if anyway knows how I can access the user ID from the session object in Rails using the Authlogic gem ?
I have a sweeper that runs to expire a fragment specific for a user:
def expire_cache_for(record)
ActiveRecord::Base.logger.debug "team: #{record.team_id}"
ActiveRecord::Base.logger.debug("User: #{session}")
# Expire a fragment
expire_fragment(:controller => 'groups', :action => "team_#{record.team_id}_user_#{current_user.id}")
end
How can I access the user ID from my sweeper to expire the fragment using Authlogic ?