Use Concerns in Rails
When it comes that you need to reuse some functions across different models in
Rails, Concern [http://api.rubyonrails.org/classes/ActiveSupport/Concern.html]
comes to rescue.
In our example, we have a few stats models which all have result_on field, which
needs to be calculated from passed params…