At your model, override the find method:
class SomeModel < ActiveRecord::Base
class << self
def find(*args)
with_scope( :conditions => {:property => 'value'} ) do
super(*args)
end
end
end
end
-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/ (en)
On Fri, Feb 27, 2009 at 5:11 PM, ericindc <[email protected]> wrote:
>
> Not at this point, so I'd prefer to come up with a solution using
> 2.2.2.
>
> On Feb 27, 12:46 am, Craig Demyanovich <[email protected]> wrote:
>> If you can move to Rails 2.3, which is currently in release candidate
>> testing, you could use default
>> scoping:http://ryandaigle.com/articles/2008/11/18/what-s-new-in-edge-rails-de...
>>
>> Regards,
>> Craig
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---