Sha256: 5fe4be84be2d216a4a43f9018737c29f15cdd7128734633f5563d3c5d753be18

Contents?: true

Size: 248 Bytes

Versions: 38

Compression:

Stored size: 248 Bytes

Contents

module Agilibox::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

38 entries across 38 versions & 1 rubygems

Version Path
agilibox-2.0.0 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.11.0 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.10.5 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.10.2 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.10.1 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.10.0 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.20 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.19 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.18 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.17 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.16 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.15 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.14 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.13 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.12 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.11 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.10 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.9 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.8 app/models/concerns/agilibox/pluck_distinct.rb
agilibox-1.9.7 app/models/concerns/agilibox/pluck_distinct.rb