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 cdemyanov...@gmail.com wrote:
If you can move to Rails 2.3, which is currently in release candidate
testing, you could use default
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) |
I originally used a with_scope, but that doesn't play nicely with
will_paginate.
On Feb 27, 3:14 pm, Maurício Linhares mauricio.linha...@gmail.com
wrote:
At your model, override the find method:
class SomeModel ActiveRecord::Base
class self
def find(*args)
with_scope(
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-default-scoping
Regards,
Craig
--~--~-~--~~~---~--~~
You received this message because
4 matches
Mail list logo