Skip to content

A basic test using Single Table Inheritance(STI) failing to get subclasses_of with ruby 1.8.7

Notifications You must be signed in to change notification settings

JezC/subclasses_of

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a test case for something tht puzzles me.

I want to be able to create an application that has a set of STI models.
I want to be able to create a select field with a choice of the types.
If I just use "Parent.subclasses_of(Parent)", it fails. If I use the
derived types, then use the same call, I see them.
This is probably something to do with lazy loading of models... maybe.

To see the problem, install the app, run the server and navigate to
http://localhost:3000/parents to see the single defined view for this
application. It has two variables, one holding the types seen before using
them (none, in my case) and one holding the types seen after using them 
(both of them). I find this confusing. I probably don't know enough...

About

A basic test using Single Table Inheritance(STI) failing to get subclasses_of with ruby 1.8.7

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published