> it seems :dependent => :destroy is needed to have automatic > collections on a show page. > Not sure if this is logical?
Yeah there's a story behind that. When we were trying to improve Hobo's automatic UI that it creates, we were looking at hand-crafted websites for patterns. One obvious one is that the models tend to be arranged in a hierarchy. The site contains projects, projects contain stories, stories contain tasks, etc... If you know what this hierarchy is, you can do cool things like breadcrumbs (or parent links at least - which Hobo now has), embedded collections and forms, etc. We didn't like the idea of declaring this hierarchy in the model, as it's really a view and maybe controller concern. What we did notice was that :dependent => :destroy can be used as a way to guess the hierarchy. When you delete the story, you delete the tasks. That's where that idea came from, but it's not really a very good idea : ) A feature that's coming up is a new place to make declarations that don't really belong in the model, but aren't DRYML tags either. You'll be able to declare this hierarchy in there, and the page generators will use it to build a more sensible app. Tom (p.s. not sure when I'll get a chance to reply to all you other posts but I'll try to get to it asap as you're obviously forging ahead!) --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
