private Method

Layout.layout_directory?(layout_name)

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
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.