Module: DeathAndTaxes::Taxer::ClassMethods

Defined in:
lib/death_and_taxes/taxer.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_taxer(*args) ⇒ Object

Makes this model a taxer It will then be able to create and possess taxes Example:

class State < ActiveRecord::Base
  acts_as_taxer
end


15
16
17
18
19
# File 'lib/death_and_taxes/taxer.rb', line 15

def acts_as_taxer(*args)    
  class_eval do
    has_many :taxes, :as => :taxer, :class_name => "DeathAndTaxes::Tax"
  end
end