May 9, 2015 by Daniel P. Clark

Chaining an Array into Arel ors

I’d like to keep this post short.  So the basic idea behind this is that Arel helps you build SQL queries.  When you want to join multiple queries together into one result you use Arel’s or method.  The way Arel chains additional query commands is by nesting inside the current query.  For example, if you…

Continue Reading »

January 27, 2015 by Daniel P. Clark

or

Truthiness Both or and || will return the first item that evaluates as true from the left side to the right. true or “this doesn’t return” # => true true || “this doesn’t return” # => true false || true # => true false || false # => false false or false or 1 or…

Continue Reading »