This project is archived and is in readonly mode.
Unexpected behaviour of named_scope with :conditions and :include options
-
x@ES
- Tag changed from :conditions, :include, activerecord, named_scope to named_scope
in rails 2.3.4 all ok
-
x@ES
- Tag changed from named_scope to :conditions, :include, activerecord, named_scope
ups... restore original tags
-
Dan Pickett
- Tag changed from :conditions, :include, activerecord, named_scope to :conditions, :include, activerecord, bugmash, named_scope
-
Rohit Arondekar
Not reproducible on rails 3 beta 3 on ruby 1.9.2dev (2010-05-08 trunk 27665)
The children of the root_categories were retrieved. The following sql queries in the log entry confirms this:
Category Load (1.1ms) SELECT "categories". FROM "categories" WHERE "categories"."parent_id" IS NULL)
Category Load (0.5ms) SELECT "categories". FROM "categories" WHERE ("categories".parent_id IN (1,2,3,4,5,6))I've attached a rails app created using rails 3 beta 3, do the following to confirm:
rake db:migrate
rake db:seed
rails serverNavigate to localhost:3000/categories/index and note that category 1 and 4 have children being displayed.
P.S I've used scope instead of named_scope, but I tried both and got the same result.
-
Anil Wadghule
Verified app provided by Rohit. This issue is not reproducible with latest rails head (58adc673712).
-
Rohit Arondekar
- State changed from new to invalid
