Sha256: 726af50ec4e72c214a1a73f76e870ac68b66e499c67850c4b074f93e71045c3e

Contents?: true

Size: 493 Bytes

Versions: 2

Compression:

Stored size: 493 Bytes

Contents

require 'arid_cache'

class User < ActiveRecord::Base
  has_many :companies, :foreign_key => :owner_id
  named_scope :companies, :joins => :companies
  named_scope :successful, :joins => :companies, :conditions => 'companies.employees > 50'
  
  def big_companies
    companies.find :all, :conditions => [ 'employees > 20' ]
  end

  def pet_names
    ['Fuzzy', 'Peachy']
  end
  
  def method_missing(method, *args)
    if method == :is_high?
      true
    else
      super
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
arid_cache-0.1.1 test/models/user.rb
arid_cache-0.0.5 test/models/user.rb