Class: ChildPolicy
- Inherits:
-
ApplicationPolicy
- Object
- ApplicationPolicy
- ChildPolicy
- Defined in:
- app/policies/child_policy.rb
Instance Method Summary collapse
-
#edit_child_attributes? ⇒ Boolean
(also: #edit_child_setting?)
Not merging status and not parent and Show Child Attributes.
-
#parent? ⇒ Boolean
private
User’s children list include child.
- #show_credentials? ⇒ Boolean (also: #show_child_attributes?)
Methods inherited from ApplicationPolicy
#classroom_rosterer_light?, #district_leader?, #enterprise_manageable?, #school_leader_rosterer?, #teacher?
Instance Method Details
#edit_child_attributes? ⇒ Boolean Also known as: edit_child_setting?
Not merging status and not parent and Show Child Attributes
44 45 46 |
# File 'app/policies/child_policy.rb', line 44 def edit_child_attributes? !merging? && !parent? && show_child_attributes? end |
#parent? ⇒ Boolean (private)
User’s children list include child
138 139 140 |
# File 'app/policies/child_policy.rb', line 138 def parent? user_children.include?(record) end |
#show_credentials? ⇒ Boolean Also known as: show_child_attributes?
97 98 99 |
# File 'app/policies/child_policy.rb', line 97 def show_credentials? parent? || classroom_rosterer_light? end |