Class: Renalware::Medications::PrescriptionPolicy

Inherits:
BasePolicy show all
Defined in:
app/policies/renalware/medications/prescription_policy.rb

Instance Attribute Summary

Attributes inherited from ApplicationPolicy

#record, #user

Instance Method Summary collapse

Methods inherited from BasePolicy

#contact_added?, #debug?, #index?, #initialize, #show?, #sort?

Methods inherited from ApplicationPolicy

#index?, #initialize, #scope, #show?

Constructor Details

This class inherits a constructor from Renalware::BasePolicy

Instance Method Details

#create?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'app/policies/renalware/medications/prescription_policy.rb', line 10

def create?
  super && user_is_a_prescriber?
end

#destroy?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/policies/renalware/medications/prescription_policy.rb', line 22

def destroy?
  super && user_is_a_prescriber?
end

#edit?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/policies/renalware/medications/prescription_policy.rb', line 14

def edit?
  super && user_is_a_prescriber?
end

#new?Boolean

Returns:

  • (Boolean)


6
7
8
# File 'app/policies/renalware/medications/prescription_policy.rb', line 6

def new?
  super && user_is_a_prescriber?
end

#update?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'app/policies/renalware/medications/prescription_policy.rb', line 18

def update?
  super && user_is_a_prescriber?
end