Ruby notes

It is usually better to use ! rather than the more explicit == false.

When using .try with a method that takes options, pass them into try separated by commas:

.include?(q) becomes .try(:include?, q)

 
0
Kudos
 
0
Kudos

Now read this

Hints on Savon and Rails

So I had to use the Savon gem recently, and there’s a couple pitfalls that aren’t super well documented. There’s a couple great resources for learning however. Most notable are the Savon docs themselves and Ryan Bates’ RailsCasts. Keep... Continue →