Sha256: e1b8f4a44b9edf9e91bb1abc83ad91883e47f38e7f888e21fe1e886911125ccb

Contents?: true

Size: 215 Bytes

Versions: 33

Compression:

Stored size: 215 Bytes

Contents

class Office < ActiveRecord::Base
  has_many :employees

  default_scope lambda {
    if $default_office_scope
      where $default_office_scope
    end
  }

  scope :usa, -> {
    where(:country => "USA")
  }

end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
directiverecord-0.1.12 test/application/app/models/office.rb
directiverecord-0.1.11 test/application/app/models/office.rb
directiverecord-0.1.10 test/application/app/models/office.rb
directiverecord-0.1.9 test/application/app/models/office.rb
directiverecord-0.1.8 test/application/app/models/office.rb
directiverecord-0.1.7 test/application/app/models/office.rb
directiverecord-0.1.6 test/application/app/models/office.rb
directiverecord-0.1.5 test/application/app/models/office.rb
directiverecord-0.1.4 test/application/app/models/office.rb
directiverecord-0.1.3 test/application/app/models/office.rb
directiverecord-0.1.2 test/application/app/models/office.rb
directiverecord-0.1.1 test/application/app/models/office.rb
directiverecord-0.1.0 test/application/app/models/office.rb