Skip to content

Commit e53ca48

Browse files
authored
docs: clarify why block is required when using a scope (#881)
1 parent 6972c3a commit e53ca48

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/define_abilities_with_blocks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ end
3838
3939
## Block Conditions with ActiveRecord Scopes
4040

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).
4242

4343
```ruby
4444
can :read, Article, Article.published do |article|

0 commit comments

Comments
 (0)