Sha256: 15ae0952da8eebdb6f724bf6f7d9b01e919f30e47bc94278e7c022ca8402cfc4
Contents?: true
Size: 561 Bytes
Versions: 11
Compression:
Stored size: 561 Bytes
Contents
require 'pet' class PetRecord < ActiveRecord::Base include Sniff::Emitter include BrighterPlanet::Pet belongs_to :species belongs_to :breed belongs_to :gender conversion_accessor :weight, :external => :pounds, :internal => :kilograms def scope_conditions_for(assoc) if assoc == :breeds and species { :species_id => species.id } else {} end end def weight_range species.minimum_weight..species.maximum_weight if species end class << self def fallback Species.fallback end end end
Version data entries
11 entries across 11 versions & 1 rubygems