Created
July 20, 2012 10:55
-
-
Save andreareginato/3150153 to your computer and use it in GitHub Desktop.
Hash guidestyle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I'm trying to search the 'cleanest' solution to create an hash. | |
# The different guidestyles I've found around does not satisfy me at all. | |
# Tell me which ones you like between those options | |
# solution 1 (favorite at the moment) | |
let!(:params) do | |
{ response_type: 'code', | |
client_id: application.id.to_s, | |
redirect_uri: application.redirect_uri, | |
scope: 'public write', | |
state: 'remember-me' } | |
end | |
# solution 2 | |
let!(:params) do | |
{ | |
response_type: 'code', | |
client_id: application.id.to_s, | |
redirect_uri: application.redirect_uri, | |
scope: 'public write', | |
state: 'remember-me' | |
} | |
end | |
# solution 3 | |
let!(:params) do | |
Hash[ response_type: 'code', | |
client_id: application.id.to_s, | |
redirect_uri: application.redirect_uri, | |
scope: 'public write', | |
state: 'remember-me' ] | |
end | |
# solution 4 | |
let!(:params) do | |
Hash[ | |
response_type: 'code', | |
client_id: application.id.to_s, | |
redirect_uri: application.redirect_uri, | |
scope: 'public write', | |
state: 'remember-me' | |
] | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment