Hey all, Here's my situation: I have a pair of controllers with associated models (called Services and Testimonials) that are quite similar. Because their CRUD behavior is executed via AJAX, the "templates" for the actions are all short .rjs files. Now, because of the similarity of the models, most of the templates are exactly the same, with only the object names changed. That is, where one looks like this:
page.visual_effect :toggle_slide, 'hidden_testimonial_form' page.visual_effect :toggle_slide, 'add_testimonial_button' The other looks like this: page.visual_effect :toggle_slide, 'hidden_service_form' page.visual_effect :toggle_slide, 'add_service_button' Obviously there's no reason these should be separate. My question is, what's the best way to set these up as shared templates? Both of the controllers inherit from a third controller (Brochure) because of shared authentication behavior. But the only way I can think of to share templates is something like this: Put template files in /views/brochure. At the end of each action, explicitly render the template. i.e. def new ... render :template => 'brochure/new end Is there a better way that I'm missing? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

