Sha256: 15cecd81c515fa8bf85663f6ffc18843641de79ee96baf2c33cda971bc809b8a

Contents?: true

Size: 1.13 KB

Versions: 20

Compression:

Stored size: 1.13 KB

Contents

require_dependency "renalware/pathology"

# This class used to include https://github.com/softace/activerecord-tableless but that does not
# support Rails 5. The alternative I have used here is to massage this class to get the specs to
# pass by stubbing out various methods.
# I'm not really sure yet how this class works and why its tableless.
module Renalware
  module Pathology
    module Requests
      class HighRiskRuleSet
        def self.rules
          GlobalRule.where(rule_set_type: name)
        end

        def self.primary_key
          :id
        end

        # NOTE: required so ActiveRecord doesn't try to create a new associated HighRiskRuleSet
        #       record with the audit
        def new_record?
          false
        end

        def to_model
          # noop
        end

        def id
          nil
        end

        def _read_attribute(name)
          # noop
        end

        def self.base_class
          Renalware::Pathology::Requests::HighRiskRuleSet
        end

        def marked_for_destruction?
          false
        end

        def destroyed?
          false
        end
      end
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
renalware-core-2.0.8 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.7 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.5 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.4 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.3 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.2 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.1 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc13 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc11 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc10 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc9 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc8 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc7 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc6 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc5 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc4 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc3 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.rc1 app/models/renalware/pathology/requests/high_risk_rule_set.rb
renalware-core-2.0.0.pre.beta12 app/models/renalware/pathology/requests/high_risk_rule_set.rb