Skip to content

Instantly share code, notes, and snippets.

@eltiare
Created November 22, 2011 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eltiare/1384890 to your computer and use it in GitHub Desktop.
Save eltiare/1384890 to your computer and use it in GitHub Desktop.
Is this DRY or just plain abuse? :)
@users = User.all(if params[:verified]
{ needs_verification: false }
elsif params[:admin]
{ User.roles.name => 'admin' }
else
{ needs_verification: true }
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment