Forum: Ruby on Rails content_for and view, controller, and default hierarchy

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Eric M. (Guest)
on 2009-02-19 06:49
(Received via mailing list)
I am trying to accomplish a hierarchy for my sidebar content using
yield :sidebar and content_for :sidebar.  What is the best way to set
up the content_for hierarchy such that the following pseudo code is
true.

if :sidebar code in View
   display View :sidebar
elsif :sidebar code in Controller
  display Controller :sidebar
else
  display Default :sidebar

Thanks in advance.
This topic is locked and can not be replied to.