franzejr / best-ruby

Ruby Tricks, Idiomatic Ruby, Refactoring and Best Practices
http://franzejr.github.io/best-ruby/
2.39k stars 219 forks source link

Try for treating nil #44

Closed chornodid closed 8 years ago

chornodid commented 8 years ago

try is not ruby trick.

franzejr commented 8 years ago

which file?

chornodid commented 8 years ago

refactorings/conditionals_when_object_is_nil.md

franzejr commented 8 years ago

Yeah. This is not a trick. It's a refactoring/idiomatic ruby from: https://robots.thoughtbot.com/code-review-ruby-and-rails-idioms. Did you see we have added refactorings/best-practices and idiomatic ruby and not only tricks ? Thanks!

chornodid commented 8 years ago

I mean it's worth to mention it's a rails method, not ruby core.

franzejr commented 8 years ago

Ow, yeah! You are right! Thanks for remembering!