# How would I implement this as a named scope?

**URL:** <https://www.ruby-forum.com/t/how-would-i-implement-this-as-a-named-scope/170812>\
**Category:** Rails\
**Created:** [June 23, 2009, 4:39am UTC](https://www.ruby-forum.com/t/how-would-i-implement-this-as-a-named-scope/170812 "2009-06-23T04:39:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![talex83](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/54ee81/32.png) [@talex83](https://www.ruby-forum.com/u/talex83)\
**Post date:** [June 23, 2009, 4:39am UTC](https://www.ruby-forum.com/t/how-would-i-implement-this-as-a-named-scope/170812/1 "2009-06-23T04:39:13Z")

</div>

I’ve made some fairly simple methods that perform a kind of generic ACL  
check. I use it as an initializer that adds one singleton method and  
one method to any subclasses of ActiveRecord.

How would I go about changing this algorithm to a named\_scope that I  
could then use in query chains?
