Sha256: 39105578f626cd095160ed4d74453a866a7549018f2b90343157c84ec4a0976c

Contents?: true

Size: 437 Bytes

Versions: 3

Compression:

Stored size: 437 Bytes

Contents

module ActiveRecord
  module ActsAs
    module ReflectionsWithActsAs
      def _reflections
        @_reflections_acts_as_cache ||=
          super.reverse_merge(acting_as_model._reflections)
      end
    end

    module ClassMethods
      def self.included(module_)
        module_.prepend ReflectionsWithActsAs
      end

      def validators_on(*args)
        super + acting_as_model.validators_on(*args)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_record-acts_as-2.0.2 lib/active_record/acts_as/class_methods.rb
active_record-acts_as-2.0.1 lib/active_record/acts_as/class_methods.rb
active_record-acts_as-2.0.0 lib/active_record/acts_as/class_methods.rb