mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-12-11 22:24:21 +01:00
e4a0798b8a
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)
21 lines
463 B
Ruby
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
|