Hey I'm working on a Rails-3.0.10 project where I suggested using Sequel as the ORM, but sadly we're using ActiveRecord (with arel 2.0.10).
I've been using Sequel for quite a while now, so I kinda think in Sequel. Maybe it's just because I don't know ActiveRecord and arel well enough, but I keep on finding myself jumping through hoops to do things that I assume ought to be simple. Like distinct, for example. There doesn't seem to be a good way of doing it in arel other than using a string 'distinct(fieldname)' which is fine unless you don't know ahead of time whether fieldname needs to be qualified by a table name. Not really a huge issue, but still. As for documentation, the first result in a google search for "arel documentation" returns a link to StackOverflow: ruby on rails 3 - Where can I find good AREL documentation Basically, there isn't any. So it took quite a while to figure out why the project method didn't work, and then figure out how to monkey-patch arel to do the equivalent of Dataset#select. By default arel's project does the equivalent of Dataset#select_more. And don't get me started on the whole ModelClass.scoped.table[:field_name] thing. Well, OK. More of a rant than an anecdote then. bye John -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sequel-talk?hl=en.
