Sha256: 2d6954d4330fe723a8290e7f0a7f7b6b5df799f1c1a5e2beb3b9d31ffaccf2ea

Contents?: true

Size: 382 Bytes

Versions: 8

Compression:

Stored size: 382 Bytes

Contents

# frozen_string_literal: true

require 'active_record'
require 'atomically/query_service'

class ActiveRecord::Relation
  def atomically
    Atomically::QueryService.new(klass, relation: self)
  end
end

class ActiveRecord::Base
  def self.atomically
    Atomically::QueryService.new(self)
  end

  def atomically
    Atomically::QueryService.new(self.class, model: self)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
atomically-1.1.2 lib/atomically/active_record/extension.rb
atomically-1.1.1 lib/atomically/active_record/extension.rb
atomically-1.1.0 lib/atomically/active_record/extension.rb
atomically-1.0.6 lib/atomically/active_record/extension.rb
atomically-1.0.5 lib/atomically/active_record/extension.rb
atomically-1.0.4 lib/atomically/active_record/extension.rb
atomically-1.0.3 lib/atomically/active_record/extension.rb
atomically-1.0.2 lib/atomically/active_record/extension.rb