This project is archived and is in readonly mode.
wrong class when using scope together with sti
Reported by gucki | May 19th, 2010 @ 10:05 AM
Using rails beta3 and ruby 1.9.2-head.
class User < ActiveRecord::Base
scope :active, where(:active => true) end
class NormalUser < User
end
User.active.first.class
=> User
NormalUser.first.class
=> NormalUser
NormalUser.active.first.class
=> User (should be NormalUser!!!)
Comments and changes to this ticket
-
gucki May 19th, 2010 @ 10:34 AM
Just upgraded to the latest rails version from git and it's working fine now. So I guess this bug has already been fixed and this ticket can be closed. :)
-
Rizwan Reza May 21st, 2010 @ 12:45 AM
- no changes were found...
-
Rohit Arondekar June 15th, 2010 @ 09:57 AM
- State changed from new to resolved
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>