Module: Extensions::HasManyInverseThrough::ActiveRecord::Reflection::ThroughReflection::PrependMethods

Defined in:
lib/extensions/has_many_inverse_through/active_record/reflection/through_reflection.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(module_) ⇒ Object


4
5
6
7
8
# File 'lib/extensions/has_many_inverse_through/active_record/reflection/through_reflection.rb', line 4

def self.prepended(module_)
  module_.class_eval do
    attr_accessor :inverse_through_name
  end
end

Instance Method Details

#initialize(delegate_reflection) ⇒ Object


10
11
12
13
# File 'lib/extensions/has_many_inverse_through/active_record/reflection/through_reflection.rb', line 10

def initialize(delegate_reflection)
  super
  @inverse_through_name = delegate_reflection.options[:inverse_through]
end