Fix statisticable concern definition

Methods defined inside "included" cannot be called using `super` from
a class including the module.
This commit is contained in:
Javi Martín
2019-04-11 15:44:49 +02:00
parent e2a3398ec0
commit 483ebffb47

View File

@@ -4,6 +4,7 @@ module Statisticable
included do included do
attr_reader :resource attr_reader :resource
end
def initialize(resource) def initialize(resource)
@resource = resource @resource = resource
@@ -145,7 +146,6 @@ module Statisticable
I18n.t("stats.age_range", start: start, finish: finish) I18n.t("stats.age_range", start: start, finish: finish)
end end
end end
end
class_methods do class_methods do
def stats_methods def stats_methods