Created
October 20, 2011 18:08
-
-
Save andrewpthorp/1301835 to your computer and use it in GitHub Desktop.
ActiveRecord models in helpers
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
module SomeHelper | |
def metrics(account) | |
opens = ContactSnapshot.opens(account, Time.zone.now-30.days, Time.zone.now).size | |
content_tag :ul do | |
content_tag :li, "#{opens} Opens." | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment