Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@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