Top "Arel" questions

Arel is a Relational Algebra for Ruby.

How to find records that have duplicate data using Active Record

What is the best way to find records with duplicate values in a column using ruby and the new Activerecord?

ruby activerecord arel
How to order included elements in Rails 3

I have a model relationship where today has many tasks I'm trying to retrieve a user's today object, include the …

ruby-on-rails ruby activerecord arel
How to exclude an array of ids from query in Rails (using ActiveRecord)?

I would like to perform an ActiveRecord query that returns all records except those records that have certain ids. The …

activerecord ruby-on-rails-3 arel active-relation
Rails `where` for time less than queries

Setup Rails' where method can take a range in a hash to generate a query that will search for a …

mysql sql ruby-on-rails date arel
arel, how to join

Given class Category < ActiveRecord::Base has_many :products, :order => 'name ASC' end Using the Rails 3 stack, how can …

ruby-on-rails ruby ruby-on-rails-3 arel
Rails 4 query unique by single attribute

So this is more of an arel question than anything but here's what I am trying to do. I have …

ruby-on-rails postgresql activerecord arel
Is it possible to get the ActiveRecord::Relation object for an association

Do association methods, such as those defined by has_many and belongs_to utilize ActiveRecord::Relation? If so, is it …

activerecord ruby-on-rails-3 associations arel
What exactly is Arel in Rails 3.0?

I understand that it is a replacement for ActiveRecord and that it uses objects instead of queries. But... why is …

ruby-on-rails ruby activerecord arel
How to implement bulk insert in Rails 3

I need to insert a array of emails as different records into my contacts table. How can this be done. …

ruby-on-rails ruby-on-rails-3 activerecord arel
How to find the record with the maximum price?

This returns the maxium value, not the complete record: self.prices.maximum(:price_field) And currently, I find the record …

ruby-on-rails-3 activerecord max arel