Skip to content

Instantly share code, notes, and snippets.

@DGaffney
Created July 22, 2011 18:11
Show Gist options
  • Select an option

  • Save DGaffney/1100024 to your computer and use it in GitHub Desktop.

Select an option

Save DGaffney/1100024 to your computer and use it in GitHub Desktop.
def index
limit = params[:limit] || 100
offset = params[:offset] || 0
@curations = []
if params[:dataset_id]
@curations = Dataset.first(:id => params[:dataset_id]).curations(:limit => limit.to_i, :offset => offset.to_i)
if params[:researcher_id]
@curations = Researcher.first(:id => params[:researcher_id]).curations(:limit => limit.to_i, :offset => offset.to_i)
else
@curations = Curation.all(:archived => false, :limit => limit.to_i, :offset => offset.to_i)
end
display @curations
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment