Commit 38af0dd5 authored by Ondřej Moravčík's avatar Ondřej Moravčík

Merge branch 'hash-style' into 'master'

hash style based official ruby code-style

See merge request !7
parents 8c231179 54090c37
......@@ -173,3 +173,17 @@ url_for({controller: 'users', action: 'index'})
# GOOD
users_path
```
##### Hash style
We prefer 1.9 hash literal syntax when your hash keys are symbols.
Don't mix the Ruby 1.9 hash syntax with hash rockets in the same hash literal. When you've got keys that are not symbols stick to the hash rockets syntax.
```ruby
# BAD
{ a: 1, 'b' => 2 }
# GOOD
{ :a => 1, 'b' => 2 }
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment