Sha256: 52cfac616cf4131e449377e97100bab93c105023928c24e2f9fa6b280e5da99d

Contents?: true

Size: 856 Bytes

Versions: 3

Compression:

Stored size: 856 Bytes

Contents

module Xeroizer
  module Record
    
    class PayrollBase < Xeroizer::Record::Base
      
      class_inheritable_attributes :fields, :possible_primary_keys, :primary_key_name, :summary_only, :validators

      def self.belongs_to(field_name, options = {})
        super(field_name, {:base_module => Xeroizer::Record::Payroll}.merge(options))
      end

      def self.has_many(field_name, options = {})
        super(field_name, {:base_module => Xeroizer::Record::Payroll}.merge(options))
      end

      def self.has_one(field_name, options = {})
        super(field_name, {:base_module => Xeroizer::Record::Payroll}.merge(options))
      end
      
      public

        def new_model_class(model_name)
          Xeroizer::Record::Payroll.const_get("#{model_name}Model".to_sym).new(parent.application, model_name.to_s)
        end

    end

  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
xeroizer-3.0.1 lib/xeroizer/record/payroll_base.rb
xeroizer-3.0.0 lib/xeroizer/record/payroll_base.rb
xeroizer-3-pre-beta-3.0.0.pre.beta lib/xeroizer/record/payroll_base.rb