This project is archived and is in readonly mode.

#4651 ✓resolved
gucki

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

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>

Pages