Skip to content

Instantly share code, notes, and snippets.

@scullygroup
Created February 3, 2009 21:11
Show Gist options
  • Save scullygroup/57762 to your computer and use it in GitHub Desktop.
Save scullygroup/57762 to your computer and use it in GitHub Desktop.
def self.results(page, id)
conditions = ["category_id = ?", id]
paginate :page => page,
:per_page => 20,
:joins => :category,
:conditions => conditions
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment