You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/define_abilities_with_blocks.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ end
38
38
39
39
## Block Conditions with ActiveRecord Scopes
40
40
41
-
It's also possible to pass a scope instead of an SQL string when using a block in an ability.
41
+
It's also possible to pass a scope instead of an SQL string when using a block in an ability. The block is **always required**, as it is called when checking discrete actions like `can` and `authorize`. See also [Defining Abilities: Best Practices](./define_abilities_best_practices.md).
42
42
43
43
```ruby
44
44
can :read, Article, Article.published do |article|
0 commit comments