Skip to content

Instantly share code, notes, and snippets.

@jamesbebbington
Created February 25, 2009 15:42
Show Gist options
  • Save jamesbebbington/70226 to your computer and use it in GitHub Desktop.
Save jamesbebbington/70226 to your computer and use it in GitHub Desktop.
@projects = current_account.projects.find(:all, :include => [:owner, :current_phase]) do
case params[:state] ||= 'active'
when 'all': # No-op
when 'active': archived_at.nil?
when 'inactive': archived_at.not.nil?
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment