Skip to content

Scoped index resource

houen edited this page Jan 21, 2012 · 2 revisions

To scope the collection returned in the index action, follow this pattern:

controller do
  def scoped_collection
    end_of_association_chain.scoped_by_something
  end
end
Clone this wiki locally