Displaying 1 result from an estimated 1 matches for "sysfolder".
Did you mean:
subfolder
2007 May 29
0
STI and Active Record
Hey,
I''m trying to use STI in my models, while writing a little cms.
A have a model called Page and some subclasses like ContentPage,
Sysfolder etc. Some classes share similar attributes, so I use STI and
one table for all types.
Now I''m writing a form for edititing a page and I want to have the
opportunity to change the type of it at runtime. But that seems to be
a problem:
When I say:
page = Page.find(x)
page.type = ContentPag...