Class: C80Estate::ItemProp

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/c80_estate/item_prop.rb

Class Method Summary collapse

Class Method Details

.all_uniq_values(prop_name_id) ⇒ Object



10
11
12
13
14
15
# File 'app/models/c80_estate/item_prop.rb', line 10

def self.all_uniq_values(prop_name_id)
  r = self.where(prop_name_id: prop_name_id)
      .map { |ip| ip.value.to_i }.uniq
  # Rails.logger.debug("<ItemProp.all_uniq_values> #{prop_name_id}: #{r}")
  r
end