Sha256: 61e1c594507a654f885563b72dd74c77082172dc2a4082e886456c99c7e9d45d

Contents?: true

Size: 233 Bytes

Versions: 3

Compression:

Stored size: 233 Bytes

Contents

# frozen_string_literal: true

require 'active_record'

class << ActiveRecord::Base
  def from(value) # For Rails 3
    value = "(#{value.to_sql}) subquery" if value.is_a?(ActiveRecord::Relation)
    return super
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
atomically-1.1.5 lib/atomically/patches/from.rb
atomically-1.1.4 lib/atomically/patches/from.rb
atomically-1.1.3 lib/atomically/patches/from.rb