On Jun 2, 2011, at 8:09 AM, Peter Booth wrote: > Is there a heuristic that tells me whether I should be putting code > in app/views/my_nodel/show.dryml or app/views/taglib/application.dryml ?
What Tiago said - pretty much, things that you'd extract to a view helper in a vanilla-Rails app will tend to end up in the taglibs folder instead. Some more specific examples: - global <page> tag - navigation tags - custom views/inputs for rich types - bigger reusable chunks; for instance, a reservation app that I've got defines a tag to make an "invoice view" of a set of selections, which gets used in a number of different pages (checkout, confirmation, etc) Things that probably *shouldn't* go into taglibs: - redefinitions of show-page, etc. for particular types. Unless you've got *lots* of subsites or something else weird, it's better to just put that sort of code in the regular view files. --Matt Jones -- 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.
