#104 invalid
Dan Kubb (dkubb)

STI type column not constantized

Reported by Dan Kubb (dkubb) | December 20th, 2007 @ 07:36 PM

When pulling the type column from the DB (as in the case when you're using STI) its not being constantized. This fails when the variable is used as a class method, and its still a String instance.

Attached is a patch that solves the problem.

I did not know how best to write a spec for this since there's a mock adapter that (appears to) completely bypass the abstract adapter. If you give me some direction on what you'd like to see for the specs I'd be happy to write them.

Comments and changes to this ticket

  • Sam Smoot

    Sam Smoot December 27th, 2007 @ 09:54 AM

    • State changed from “new” to “invalid”

    The correct property declaration is:

    property :type, :class
    

    You wouldn't know this without reading the code though, so a documentation patch documenting the built-in types would be appreciated if you have the time.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket

Attachments

Pages