Shared partials will work for this, but (like Rails) it isn't a great practice to be fetching data from them. And relying on instance variables from the controller gets pretty hairy.
Merb Parts could be a great solution to this, but they currently have some issues with block context that makes them a bit sketchy at the moment. Until I'm able to get Merb Parts fixed up, I've just been using partials that call helpers to get the data, which just fetch from the database using models. - Jacques twitter: merbjedi On Jan 24, 3:42 pm, cult hero <[email protected]> wrote: > Okay, this is probably the last major hurdle I foresee in my merb use. > (Isn't that optimistic!) > > Let's say I'm building a website and I have the obvious sidebar that > shows some recent blog posts and a picture and some other bits and > pieces from various models and resources throughout the website. > Obviously, I don't want to have every last controller action in my app > get those values and feed them to each and every template so, what's > the best way to handle this? > > Will partials do the trick? (I have yet to find a decent example of > how to use them.) Or is there some other method. I believe Django used > something they called a context for stuff like that. > > Point is, how do I build something like that? What do I use? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
