I have trouble with using Arel to aggregate 2 columns in the same query. When I run this, the whole server freezes for a minute, before the rails dev-server crashes. I suspect an infinite loop :).
Rails 3 problem. I have a Foods table of foods with the following attributes: name calories (per gram) fat (per gram)
I\'ve hit a slight block with the new scope methods (Arel 0.4.0, Rails 3.0.0.rc) Basically I have: A topics model, which has_many :comments, and a comments model (with a topic_id column) which belon
I have the following models class Courier < ActiveRecord::Base has_many :coverages end class Coverage < ActiveRecord::Base
I have a table called translations. (And a correspoding ActiveRecord class). This table contains the following fields
In Rails3 there seems to be a problem when chaining two scopes (ActiveRelations) that each have a different include:
I\'m doing开发者_运维问答 my best to bend my brain around arel and the relational algebra behind it, but how to represent a SELECT DISTINCT is consistently eluding my comprehension. Can anyone explain
I have these tables and relationships: user has_many projects project has_many tasks task has_many actions
I am attempting to n开发者_JAVA技巧est SELECT queries in Arel and/or Active Record in Rails 3 to generate the following SQL statement.
If you build a projection like this: t = Arel::Table.new(:projects) ps = t.project(t[:id].as(:snark)) How do you get the result column that\'s 开发者_开发百科named :snark?Since you are using the Ar