Sha256: 04caf8dc4847cfce2ea5cae14a9cfefe5bc3d568e272c2710bac069038d8dd37

Contents?: true

Size: 223 Bytes

Versions: 8

Compression:

Stored size: 223 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

8 entries across 8 versions & 1 rubygems

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