Sha256: c5c706b6be35eca6fdbd46e532ea4a75c5151a7f28622c237cfe2e6080c77a35

Contents?: true

Size: 243 Bytes

Versions: 19

Compression:

Stored size: 243 Bytes

Contents

module BMC::PluckDistinct
  extend ActiveSupport::Concern

  class_methods do
    def pluck_distinct(column)
      all
        .reorder(column)
        .select(column)
        .distinct
        .pluck(column)
    end
  end # class_methods
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
bmc-1.6.1 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.6.0 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.5.1 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.5.0 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.4.3 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.4.2 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.4.1 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.4.0 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.3.5 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.3.4 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.3.3 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.3.2 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.3.1 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.3.0 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.2.1 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.2.0 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.1.0 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.0.1 app/models/concerns/bmc/pluck_distinct.rb
bmc-1.0.0 app/models/concerns/bmc/pluck_distinct.rb