Sha256: 80b71822a9efdaf04fda6be455f5558ce9ef2bf50d247c1e2c89f33d13b99e74

Contents?: true

Size: 161 Bytes

Versions: 4

Compression:

Stored size: 161 Bytes

Contents

# frozen_string_literal: true

module ActiveRecord
  module Calculations
    def pick(*column_names)
      limit(1).pluck(*column_names).first
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activerecord-pick-0.2.0 lib/activerecord/pick/relation/calculations.rb
activerecord-pick-0.1.2 lib/activerecord/pick/relation/calculations.rb
activerecord-pick-0.1.1 lib/activerecord/pick/relation/calculations.rb
activerecord-pick-0.1.0 lib/activerecord/pick/relation/calculations.rb