May 13, 2015 by Daniel P. Clark

Rails: Don’t “pluck” Unnecessarily

Using pluck in Rails is both quick and efficient.  But there are cases where it’s not what you want to use.  For example if you’re selecting all users who have contacts, you might see something like this.

Rails’ where method allows for Arrays of items for lookup so the above code might turn into…

Continue Reading »

February 14, 2015 by Daniel P. Clark

Use the given project generators

Rails Before I started using Rails I was the guy who would type out web projects by hand… I was accustomed to it.  I knew what I was working with all the time simply because I wrote it.  When I had started reading the docs on Rails I was trying to learn it in this…

Continue Reading »