Sha256: 8f368c4fa151284d6b097b73b4591b0bbf4675563b917dd22c36caded177fefe

Contents?: true

Size: 300 Bytes

Versions: 6

Compression:

Stored size: 300 Bytes

Contents

# frozen_string_literal: true

module ExtendHasMany
  extend ::ActiveSupport::Concern

  class_methods do
    def has_many(*args, &block)
      options = args.extract_options!
      options[:extend] = Array(options[:extend]).push(ClassMethods)
      super(*args, **options, &block)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cable_ready-5.0.0.pre9 app/models/concerns/extend_has_many.rb
cable_ready-5.0.0.pre8 app/models/concerns/extend_has_many.rb
cable_ready-5.0.0.pre7 app/models/concerns/extend_has_many.rb
cable_ready-5.0.0.pre6 app/models/concerns/extend_has_many.rb
cable_ready-5.0.0.pre5 app/models/concerns/extend_has_many.rb
cable_ready-5.0.0.pre4 app/models/concerns/extend_has_many.rb