Created
November 12, 2008 09:40
-
-
Save speedmax/24121 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
class Profile < ActiveRecord:Base | |
# Controller pass request object as param | |
# Stat wrapper sends out async request to web services | |
def register_pageview(request) | |
api = "asdf2134asfd2134" | |
@stat = SimpleStat.new(api, request) | |
end | |
# pageviews most likely to be cached | |
def monthly_pageviews | |
@stat.pageviews(1.month.from.now) | |
end | |
def daily_pageviews | |
@stat.pageviews(1.day.from.now) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment