Sha256: 0e7c2ddb815d080c61256b9a2f2152455722f657ced5951810d427476438e87c

Contents?: true

Size: 303 Bytes

Versions: 24

Compression:

Stored size: 303 Bytes

Contents

class Upsert
  module ActiveRecordUpsert
    def upsert(selector, setter = {})
      ActiveRecord::Base.connection_pool.with_connection do |c|
        upsert = Upsert.new c, table_name
        upsert.row selector, setter
      end
    end
  end
end

ActiveRecord::Base.extend Upsert::ActiveRecordUpsert

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
upsert-2.9.10-java lib/upsert/active_record_upsert.rb
upsert-2.9.10 lib/upsert/active_record_upsert.rb
upsert-2.9.9-universal-java-11 lib/upsert/active_record_upsert.rb
upsert-2.9.9 lib/upsert/active_record_upsert.rb
upsert-2.2.1 lib/upsert/active_record_upsert.rb
upsert-2.2.0 lib/upsert/active_record_upsert.rb
upsert-2.1.2 lib/upsert/active_record_upsert.rb
upsert-2.1.1 lib/upsert/active_record_upsert.rb
upsert-2.1.0 lib/upsert/active_record_upsert.rb
upsert-2.0.4 lib/upsert/active_record_upsert.rb
upsert-2.0.3 lib/upsert/active_record_upsert.rb
upsert-2.0.2 lib/upsert/active_record_upsert.rb
upsert-2.0.1 lib/upsert/active_record_upsert.rb
upsert-2.0.0 lib/upsert/active_record_upsert.rb
upsert-1.2.0 lib/upsert/active_record_upsert.rb
upsert-1.1.7 lib/upsert/active_record_upsert.rb
upsert-1.1.6 lib/upsert/active_record_upsert.rb
upsert-1.1.5 lib/upsert/active_record_upsert.rb
upsert-1.1.4 lib/upsert/active_record_upsert.rb
upsert-1.1.3 lib/upsert/active_record_upsert.rb