1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-11 22:24:21 +01:00
fab-manager/app/models/concerns/stat_concern.rb
Sylvain e4a0798b8a (bug) statistics not built
for instances with plans created before v4.3.3, the StatisticType.key does not match Plan.duration because of a behavior change in rails framework. (v4.3.3 introduces a framework upgrade)
2022-01-18 14:01:34 +01:00

21 lines
463 B
Ruby

# frozen_string_literal: true
module StatConcern
extend ActiveSupport::Concern
included do
attribute :type, String
attribute :subType, String
attribute :date, String
attribute :stat, Integer
attribute :userId, Integer
attribute :gender, String
attribute :age, Integer
attribute :group, String
# has include Elasticsearch::Persistence::Model
index_name 'stats'
document_type to_s.demodulize&.underscore
end
end