lib/moribus/extensions/has_aggregated_extension.rb
# Add all the interesting methods of the association's klass:
# generated attribute readers and writers, as well as enum readers
# and writers.
Add all the interesting methods of the association's klass:
generated attribute readers and writers, as well as enum readers
and writers.
Add all the interesting methods of the association ' s klass : generated attribute readers and writers as well as enum readers and writers .
def add_delegated_methods(reflection)
          mod = reflection.delegated_attribute_methods
          model.define_attribute_methods
          methods_to_delegate = methods_to_delegate_to(reflection) - model.instance_methods.map(&:to_sym)
          methods_to_delegate.each do |method|
            mod.delegate method, :to => name
          end
        end
def add_delegated_methods ( reflection ) mod = reflection . delegated_attribute_methods model . define_attribute_methods methods_to_delegate = methods_to_delegate_to ( reflection ) - model . instance_methods . map ( & :to_sym ) methods_to_delegate . each do | method | mod . delegate method , :to => name end end
Add all the interesting methods of the association's klass:
generated attribute readers and writers, as well as enum readers
and writers.
Add all the interesting methods of the association ' s klass : generated attribute readers and writers as well as enum readers and writers .
reflection