I have experienced big troubles with STI : I have followed all the steps
described in the cookbook, but hobo_migration doesn't see the change (and it
doesn't see the sti_type added to the parent class either).
My whole application is attached (See the photo model).
Thank you for your help !
Thank you for your help, hobo_migration works good now, and I have generated
my application fine. However, I don't see how I can do this :
- Hide the Child classes
- Just show the parent one
- When a new photo is created, the only thing which will determinate the
child class where the object will be saved will be a select (or whatever)
tag with the name of the child classes. Is it possible ?
Thank you for your help again.
PS: I haven't seen the child classes's tabs in the menu selection after the
migration, by the way (and the edited form in the parent class doesn't affect
the child one, which is annoying since I must do that because of
paperclip_with_hobo's bugs).
Yes, I was talking about the nav bar. However, the hidden child classes
is the current state.
> > - When a new photo is created, the only thing which will determinate the
> > child class where the object will be saved will be a select (or whatever)
> > tag with the name of the child classes. Is it possible ?
>
> You should be able to add an input tag to your form for your "type"
> attribute.
I will do that, thanks.
> >
> > Thank you for your help again.
> >
> > PS: I haven't seen the child classes's tabs in the menu selection after the
> > migration, by the way (and the edited form in the parent class doesn't affect
> > the child one, which is annoying since I must do that because of
> > paperclip_with_hobo's bugs).
>
> Menu selection -- do you mean the nav bar? See above. Obviously,
> I'm misunderstanding you for at least one of those...
Sorry for my English, it's not my native language and I just began learning
it three years ago.
However, my current application works as if there were no child classes at
all : They are hidden from the nav bar, hidden in the associated classes
(the class that they belong to doesn't mention them). I must manually type
their name in the adress bar to see them.
Thank you for your help,
Othmane Benkirane.
PS : I have attached the current application. If you don't want me to do that
again (if, for example, it's too heavy), just let me know. The parent class
is Photo and the child classes are DogPhoto and LitterPhoto.