Module: Clubhouse::Concerns::Policies::OrganizationPolicy
- Extended by:
- ActiveSupport::Concern
- Included in:
- OrganizationPolicy
- Defined in:
- lib/clubhouse/concerns/policies/organization_policy.rb
Instance Method Summary collapse
- #check? ⇒ Boolean
- #create? ⇒ Boolean
- #destroy? ⇒ Boolean
- #index? ⇒ Boolean
- #permitted_attributes ⇒ Object
- #show? ⇒ Boolean
- #update? ⇒ Boolean
Instance Method Details
#check? ⇒ Boolean
15 16 17 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 15 def check? true end |
#create? ⇒ Boolean
11 12 13 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 11 def create? true end |
#destroy? ⇒ Boolean
27 28 29 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 27 def destroy? admin? end |
#index? ⇒ Boolean
7 8 9 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 7 def index? parent == user end |
#permitted_attributes ⇒ Object
31 32 33 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 31 def permitted_attributes [:name, :email] end |
#show? ⇒ Boolean
19 20 21 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 19 def show? member? end |
#update? ⇒ Boolean
23 24 25 |
# File 'lib/clubhouse/concerns/policies/organization_policy.rb', line 23 def update? admin? end |