How do you write a NOT EXISTS in Arel? I\'m having trouble translating this query into Arel: SELECT * FROM deals
I want to store IP addresses (v4 and v6) in my rails application. I have installed an extension to MySQL adds functions to convert ip strings to binary which will allow me to query by IP range easily.
I\'ve got a fairly complex sql query that I\'m pretty sure I can\'t accomplish with ARel (Rails 3.0.10)
I\'ve got some SQL that\'s working when I want to look for particular pages that have the particular schemes assigned to it (all through the scheme_assignment):
I have a Collection class which has many coins. I am trying to select collections which have more than two coins.
I want to run Alarm.destroy_all, though, each alarm is associated to many AlarmEvents, and each AlarmEvent is associated to many AlarmEvent::Measurements,being both associations marked as :dependent=&
I\'m looking for a way to shorten up the :include => :child inside a respond_with which generates json.
I might be lacking some understanding concerning Arel objects in Rails. You can do something like: u = User.arel_table
I want to grab all the categories that contain purchaseable products. class Product < ActiveRecord::Base
In my Rails models I have: class Song < ActiveRecord::Base has_many :flags has_many :accounts, :through => :flags