yeah, that's basically what I did.  Where a model employs a custom
form or card I now have a form.dryml or card.dryml in views/model, and
include it explicitly in application.dryml.  Only improvement would be
to have form.dryml and card.dryml noticed and automatically included
when they exist, as occurs with index and show (although my guess is
that those cases have something to do with REST).

On Jun 17, 1:35 pm, kevinpfromnm <[email protected]> wrote:
> The ideal is to be completely DRY.  Tags that are used in multiple
> places should be defined in application.dryml while changes that will
> only effect one page should be done by overriding the particular
> page.  Thus, forms being used in both edit and new pages, generally
> should be defined as a tag.  It's not terribly different from partials
> in terms of vanilla RoR.
>
> As far as your approach, it seems reasonable if you have a large
> number of form overrides to do that.  Other possibility would be to
> make a form.dryml and put all your custom form code in there.
>
> As you get more used to hobo you'll probably find that you're having
> to override smaller parts of your tags and it becomes cumbersome to
> have a file for each model.
>
> On Jun 15, 4:55 pm, Montgomery Kosma <[email protected]> wrote:
>
> > should have added that the approach I've taken, perhaps not ideal or
> > non-standard, is to add to application.dryml a line like this:
>
> > <include src="models/form"/>
>
> > for each of my models, replacing "models" with each one's pluralized
> > name.  Seems to work okay...
>
> > On Jun 15, 6:46 pm, Montgomery Kosma <[email protected]> wrote:
>
> > > By following the various hobo tutorials, I've built up an app that
> > > customizes index and show pages using index.dryml and show.dryml
> > > located in each model's views/model folder.  However, forms (and
> > > cards, to the extent I use them) are customized via code found in my
> > > application.dryml.
>
> > > I gather the reason for this is that the "form" is common to both the
> > > new and edit page.
>
> > > This seems inconsistent and far from ideal for long-term maintenance
> > > and (especially) clarity for when I hand this off to a "real" rails
> > > developer.
>
> > > Is there an obvious or accepted solution to this dilemma in the hobo
> > > community?
>
> > > To keep consistent with show and index, I'd love to be able to create
> > > a form.dryml in my model's view folder, and have the default new and
> > > edit actions look for and pick up on its existence.  Not sure whether
> > > that's sensible or the best place to go about doing that ...
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to