Skip to content

Commit 5f68ae3

Browse files
can_can_ability -> can_can_action typos in guide
1 parent c6f0d43 commit 5f68ae3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

guides/authorization/can_can_integration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ module Types::BaseInterface
140140
end
141141
```
142142

143-
Then, you can add `can_can_ability:` options to your fields:
143+
Then, you can add `can_can_action:` options to your fields:
144144

145145
```ruby
146146
class Types::JobPosting < Types::BaseObject
147147
# Only allow `can :review_applications, JobPosting` users
148148
# to see who has applied
149149
field :applicants, [Types::User], null: true,
150-
can_can_ability: :review_applicants
150+
can_can_action: :review_applicants
151151
end
152152
```
153153

@@ -161,7 +161,7 @@ Similar to field-level checks, you can require certain permissions to _use_ cert
161161
class Types::BaseArgument < GraphQL::Schema::Argument
162162
# Include the integration and default to no permissions required
163163
include GraphQL::Pro::CanCanIntegration::ArgumentIntegration
164-
can_can_ability nil
164+
can_can_action nil
165165
end
166166
```
167167

@@ -178,13 +178,13 @@ class Types::BaseInputObject < GraphQL::Schema::InputObject
178178
end
179179
```
180180

181-
Now, arguments accept a `can_can_ability:` option, for example:
181+
Now, arguments accept a `can_can_action:` option, for example:
182182

183183
```ruby
184184
class Types::Company < Types::BaseObject
185185
field :employees, Types::Employee.connection_type, null: true do
186186
# Only admins can filter employees by email:
187-
argument :email, String, required: false, can_can_ability: :admin
187+
argument :email, String, required: false, can_can_action: :admin
188188
end
189189
end
190190
```

0 commit comments

Comments
 (0)