Rails Named Scope and overlapping conditions
- by Tumtu
Hi everyone, have a question about rails SQL generation:
class Organization < ActiveRecord::Base
has_many :people
named_scope :active, :conditions => { :active => 'Yes' }
end
class Person < ActiveRecord::Base
belongs_to :organization
end
Rails SQL for all active people in the first organiztion
…