This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
like us on <a href="http://www.facebook.com/plugins/like.php?href=http://www.facebook.com/birdhouseforautism">Facebook</a> | |
follow us on <a href="https://twitter.com/intent/follow?original_referer=https%3A%2F%2Ftwitter.com%2Fabout%2Fresources%2Fbuttons®ion=follow_link&screen_name=birdhousehq&tw_p=followbutton&variant=2.0">Twitter</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.are_you_using_this | |
## get all of the users | |
u = User.all | |
## for each user, do the following thing | |
u.each do |u| | |
## get the date of user’s latest session | |
last_session_date = u.sessions.last ? u.sessions.last.created_at : nil |