Sha256: 9c0b04c5c6ad458e03006c64850875aa1e0146f26835d78b478728e9c8b11957

Contents?: true

Size: 215 Bytes

Versions: 19

Compression:

Stored size: 215 Bytes

Contents

module BMC::PluckToHash
  extend ActiveSupport::Concern

  class_methods do
    def pluck_to_hash(*attributes)
      pluck(*attributes).map { |values| attributes.zip(values).to_h }
    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_to_hash.rb
bmc-1.6.0 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.5.1 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.5.0 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.4.3 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.4.2 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.4.1 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.4.0 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.3.5 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.3.4 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.3.3 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.3.2 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.3.1 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.3.0 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.2.1 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.2.0 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.1.0 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.0.1 app/models/concerns/bmc/pluck_to_hash.rb
bmc-1.0.0 app/models/concerns/bmc/pluck_to_hash.rb