<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>accessible_paths (ActionView::Template)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/action_view/template.rb, line 119</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">accessible_paths</span> <span class="ruby-identifier">paths</span> = [] <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">valid_extension?</span>(<span class="ruby-identifier">extension</span>) <span class="ruby-identifier">paths</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">path</span> <span class="ruby-identifier">paths</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">path_without_extension</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">multipart?</span> <span class="ruby-identifier">formats</span> = <span class="ruby-identifier">format</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">"."</span>) <span class="ruby-identifier">paths</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{path_without_format_and_extension}.#{formats.first}"</span> <span class="ruby-identifier">paths</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"#{path_without_format_and_extension}.#{formats.second}"</span> <span class="ruby-keyword kw">end</span> <span class="ruby-keyword kw">else</span> <span class="ruby-comment cmt"># template without explicit template handler should only be reachable through its exact path</span> <span class="ruby-identifier">paths</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">template_path</span> <span class="ruby-keyword kw">end</span> <span class="ruby-identifier">paths</span> <span class="ruby-keyword kw">end</span></pre> </body> </html>