Module: Humanoid::Associations

Defined in:
lib/humanoid/associations.rb,
lib/humanoid/associations/proxy.rb,
lib/humanoid/associations/has_one.rb,
lib/humanoid/associations/options.rb,
lib/humanoid/associations/has_many.rb,
lib/humanoid/associations/belongs_to.rb,
lib/humanoid/associations/has_one_related.rb,
lib/humanoid/associations/has_many_related.rb,
lib/humanoid/associations/belongs_to_related.rb

Overview

:nodoc:

Defined Under Namespace

Modules: ClassMethods, InstanceMethods, Proxy Classes: BelongsTo, BelongsToRelated, HasMany, HasManyRelated, HasOne, HasOneRelated, Options

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/humanoid/associations.rb', line 12

def self.included(base)
  base.class_eval do
    # Associations need to inherit down the chain.
    class_inheritable_accessor :associations
    self.associations = {}

    include InstanceMethods
    extend ClassMethods
  end
end