Commit 54090c37 authored by Lukáš Pokorný's avatar Lukáš Pokorný

hash style based official ruby code-style

parent 8c231179
......@@ -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