Skip to content

Instantly share code, notes, and snippets.

@ayrton
Created April 3, 2012 14:45
Show Gist options
  • Save ayrton/2292579 to your computer and use it in GitHub Desktop.
Save ayrton/2292579 to your computer and use it in GitHub Desktop.
and & &&
@error = :invalid_type and return if (type = params[:type]) and (type != :iphone && type != :android)
# exactly the same as: (if prefer the former)
if type = params[:type] and (type != :iphone && type != :android)
@error = :invalid_type
return
end
# or
type = params[:type]
if type != :iphone && type != :android
@error = :invalid_type
return
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment