Class: Renalware::LowClearance::ProfilePolicy

Inherits:
BasePolicy show all
Defined in:
app/policies/renalware/low_clearance/profile_policy.rb

Instance Attribute Summary

Attributes inherited from ApplicationPolicy

#record, #user

Instance Method Summary collapse

Methods inherited from BasePolicy

#contact_added?, #create?, #debug?, #destroy?, #index?, #initialize, #show?, #sort?, #update?

Methods inherited from ApplicationPolicy

#create?, #destroy?, #index?, #initialize, #new?, #scope, #show?, #update?

Constructor Details

This class inherits a constructor from Renalware::BasePolicy

Instance Method Details

#edit?Boolean

Returns:

  • (Boolean)


8
9
10
11
12
# File 'app/policies/renalware/low_clearance/profile_policy.rb', line 8

def edit?
  record.present? &&
    record.patient.ever_been_on_low_clearance? &&
    update?
end