Sha256: 5fa74f4332eed8dd2d34e9617dbf978ececb476dfe805d08afaf5fd09c5c50f4

Contents?: true

Size: 391 Bytes

Versions: 5

Compression:

Stored size: 391 Bytes

Contents

module Protector
  module Adapters
    module ActiveRecord
      # Patches `ActiveRecord::Associations::CollectionProxy`
      module CollectionProxy
        extend ActiveSupport::Concern
        delegate :protector_subject, :protector_subject?, :to => :@association

        def restrict!(*args)
          @association.restrict!(*args)
          self
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
protector-0.7.7 lib/protector/adapters/active_record/collection_proxy.rb
protector-0.7.6 lib/protector/adapters/active_record/collection_proxy.rb
protector-0.7.4 lib/protector/adapters/active_record/collection_proxy.rb
protector-0.7.3 lib/protector/adapters/active_record/collection_proxy.rb
protector-0.7.2 lib/protector/adapters/active_record/collection_proxy.rb