Sha256: 4b3881b22656c5071888c87f010a4aba758681da9ea12686954a2b668c780efe

Contents?: true

Size: 313 Bytes

Versions: 7

Compression:

Stored size: 313 Bytes

Contents

module Switchman
  module ActiveRecord
    module PredicateBuilder
      def convert_value_to_association_ids(value, primary_key)
        if value.is_a?(::ActiveRecord::Base)
          value.send(primary_key) # needed for sharded id translation
        else
          super
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
switchman-1.4.4 lib/switchman/active_record/predicate_builder.rb
switchman-1.4.3 lib/switchman/active_record/predicate_builder.rb
switchman-1.4.2 lib/switchman/active_record/predicate_builder.rb
switchman-1.4.1 lib/switchman/active_record/predicate_builder.rb
switchman-1.4.0 lib/switchman/active_record/predicate_builder.rb
switchman-1.3.18 lib/switchman/active_record/predicate_builder.rb
switchman-1.3.17 lib/switchman/active_record/predicate_builder.rb