4 ms·
I can see the advantages of using the Arel predicates, but to me this: User.order("id desc") reads better than: User.order(User.arel_table[User.prima
by tcopeland 12y ago
I can see the advantages of using the Arel predicates, but to me this:
User.order("id desc")
reads better than:
User.order(User.arel_table[User.primary_key].desc)
The latter seems a lot less expressive.
Also, Pat's book is great if you're curious about Ruby internals:
http://patshaughnessy.net/ruby-under-a-microscope http://patshaughnessy.net/ruby-under-a-microscope