Updated

app/models / application_record.rb

A
14 lines of codes
2 methods
4.9 complexity/method
8 churn
9.74 complexity
0 duplications
class ApplicationRecord < ActiveRecord::Base
  1. ApplicationRecord has no descriptive comment
include Applicable self.abstract_class = true def self.human_enum_name(enum_name, enum_value) I18n.t("activerecord.attributes.#{model_name .i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}") end def sanitize_amount(amount)
  1. ApplicationRecord#sanitize_amount doesn't depend on instance state (maybe move it to another class?)
amount.is_a?(String) ? amount.gsub(/[^\d-]/, '').to_i : amount end end