Hmmm - adding last_login_at could be useful with paper_clip, but so
far I am trying to store those time in file.
In order to do so I write in UserController the following code using
Donalds code:
@file = open('/log/activity.log', File::WRONLY | File::APPEND)
def log_activity(*args)
ActiveRecord::Base.actionLogger = Logger.new(@file)
actionLogger.info(args)
actionLogger.flush
end
def login
hobo_login do
LoginLogout.deliver_login( self.current_user )
msg2log = self.current_user.email_address.concat(" logged
in").concat(Time.now.inspect)
log_activity (msg2log)
end
end
def logout
LoginLogout.deliver_logout( self.current_user )
msg2log = self.current_user.email_address.concat(" logged
out").concat(Time.now.inspect)
log_activity (msg2log)
hobo_logout
end
The thing is it doesn't work.
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/hobousers?hl=en.