Skip to content

Instantly share code, notes, and snippets.

@erez-rabih
Created August 28, 2012 19:44
Show Gist options
  • Save erez-rabih/3503318 to your computer and use it in GitHub Desktop.
Save erez-rabih/3503318 to your computer and use it in GitHub Desktop.
has_many :accounts do
def recent
where('accounts.created_at > ?', 5.days.ago)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment