Forum: Ruby on Rails STI with_scope on parent - bug or feature?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Jeroen H. (Guest)
on 2006-04-01 11:39
(Received via mailing list)

It seems that setting a with_scope on the parent class doesn't do

MyClass.with_scope(:find=>{:conditions=> ["somecol = ?", 'val']}) do
   @ext_pages, @ext_rows = paginate :my_extended_class, {
     :per_page => 13
# this doesn't generate WHERE somecol='val'

In order for scope to work you have to call with_scope on the
specialized class you'll later call the find/paginate methods on, like


Should I consider this a feature or a bug?

Jeroen H. (Guest)
on 2006-04-01 13:07
(Received via mailing list)
Looks like somebody else spotted this too:
This topic is locked and can not be replied to.