with_exclusive_scope

with_exclusive_scope(method_scoping = {}, &block)
protected
Works like with_scope, but discards any nested properties.

with_exclusive_scope example by Ramon broken in latest Rails
The example Ramon gave works within the model itself, i.e.
class Article def closed with_exclusive_scope { find(:all) } end end
However, from what I can see, this approach does not work within a controller. You may be wanting to use
Article.with_exclusive_scope { find(:all) } #=> "SELECT * FROM 'articles'
But it will error out about find(:all) not existing on ArticlesController. To get around this, you must now do
Article.with_exclusive_scope { Article.find(:all) } #=> "SELECT * FROM 'articles'
In otherwards, find(:all) isn’t being executed in the scope of the model, but in the controller in which its called.
Took me a minute or two to find out, so I thought I’d let others know.

In Rails3 use "unscoped" instead
The with_exclusive_scope examples no longer work in Rails3 because with_exclusive_scope is now a protected method which can and should not be used in a controller. Use the new unscoped method instead:
Article.unscoped
For mor details and examples have a look at: http://github.com/rails/rails/commit/bd1666ad1de88598ed6f04ceffb8488a77be4385.

How to use with exclusive scope
Code example
Article.with_exclusive_scope { find(:all) } #=> "SELECT * FROM 'articles'
from http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-default-scoping