Forum: Ruby on Rails override finders?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
2f4da0b00002db5629dcaade6a8cdfc2?d=identicon&s=25 Michal Burak (michalb82)
on 2009-06-01 19:42
Hi,

1.
I have my model for e.g. "Car".
I used this model in lots of places.

2.
In a migration I added Car.is_visible default => false.

3.
Now I wan all of the finder methods to take this flag under
consideration. So initaly none of the Cars will be displayed on my site.
I will have to look for the places where I want to display "not visible"
cars and there add the special condition to the finder method (whitelist
pattern).

Any help appreciated.

M.
A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-06-01 20:03
(Received via mailing list)
http://ryandaigle.com/articles/2008/11/18/what-s-n...

-
Maurício Linhares
http://alinhavado.wordpress.com/ (pt-br) | http://blog.codevader.com/
(en)



On Mon, Jun 1, 2009 at 2:42 PM, Michal Burak
2f4da0b00002db5629dcaade6a8cdfc2?d=identicon&s=25 Michal Burak (michalb82)
on 2009-06-01 21:32
Maurício Linhares wrote:
> http://ryandaigle.com/articles/2008/11/18/what-s-n...

Thats it! Thanks!

M.
This topic is locked and can not be replied to.