Does a layout directory for this class exist? we cache this info in a class level hash
Source Code
# File action_controller/layout.rb, line 319 def layout_directory?(layout_name) view_paths.find do |path| next unless template_path = Dir[File.join(path, 'layouts', layout_name) + ".*"].first self.class.send!(:layout_directory_exists_cache)[File.dirname(template_path)] end end
<code/>and<pre/>for code samples.