can't find where to define last_request_at_threshold

140 views
Skip to first unread message

Tom Caspy

unread,
Sep 11, 2011, 11:11:58 AM9/11/11
to Authlogic
I'm trying to prevent updating user on every request, and found that I
need to define Authlogic's last_request_at_threshold. That's awesome,
but simply putting it in the acts_as_authentic block doesn't work.
where should this option be defined?

teddyg

unread,
Oct 3, 2011, 10:26:43 PM10/3/11
to Authlogic
Yeah it's a bit confusing. last_request_at_threshold is in
Authlogic::Session config (as opposed to Authlogic::ActsAsAuthentic.
The best place to put it is in your Session Class (UserSession or
PersonSession depending on how you set things up)

http://rdoc.info/github/binarylogic/authlogic/master/Authlogic/Session/MagicColumns/Config

/app/models/person_session.rb

class PersonSession < Authlogic::Session::Base

self.last_request_at_threshold = 1.hour

end

Hope this helps,
-Ted
Reply all
Reply to author
Forward
0 new messages