annikoff/redmine_plugin_computed_custom_field

View on GitHub
lib/computed_custom_field/computed_custom_field.rb

Summary

Maintainability
A
0 mins
Test Coverage
module ComputedCustomField
  def self.patch_models
    models = [
      Enumeration, Group, Issue, Project,
      TimeEntry, User, Version
    ]
    models.each do |model|
      if model.included_modules
              .exclude?(ComputedCustomField::ModelPatch)
        model.send :include, ComputedCustomField::ModelPatch
      end
    end
  end
end