Top "Active-relation" questions

A Ruby Relational Algebra Library

ActiveRecord Query Union

I've written a couple of complex queries (at least to me) with Ruby on Rail's query interface: watched_news_posts = …

ruby-on-rails activerecord union active-relation
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
Ruby on Rails - How to join two tables?

I have two tables (subjects and pages) in one-to-many relations. I want to add criterias from subjects as well pages …

ruby-on-rails-3 join active-relation
rails 3.0.3 - ActiveRecord::Relation, undefined method error

I am having this unexplained ActiveRecord::Relation, undefined method error . I don't know why, since my model association are well …

ruby-on-rails active-relation
ActiveRecord Association select counts for included records

Example class User has_many :tickets end I want to create association which contains logic of count tickets of user …

ruby-on-rails ruby ruby-on-rails-3 activerecord active-relation
How do I write a UNION chain with ActiveRelation?

I need to be able to chain an arbitrary number of sub-selects with UNION using ActiveRelation. I'm a little confused …

ruby-on-rails ruby-on-rails-3 union active-relation