doc/classes/ApplicationHelper.src/M000445.html in backlog-0.7.12 vs doc/classes/ApplicationHelper.src/M000445.html in backlog-0.8.0
- old
+ new
@@ -3,24 +3,20 @@
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
- <title>with_detour (ApplicationHelper)</title>
+ <title>back_or_link_to (ApplicationHelper)</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 app/helpers/application_helper.rb, line 17</span>
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_detour</span>(<span class="ruby-identifier">options</span>)
- <span class="ruby-identifier">detour_options</span> = {<span class="ruby-identifier">:detour</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>.<span class="ruby-identifier">reject</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">:detour</span>, <span class="ruby-identifier">:return_from_detour</span>].<span class="ruby-identifier">include?</span> <span class="ruby-identifier">k</span>.<span class="ruby-identifier">to_sym</span>}}.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span>)
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:layout</span>]<span class="ruby-operator">==</span> <span class="ruby-keyword kw">false</span>
- <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:action</span>] <span class="ruby-operator">!~</span> <span class="ruby-regexp re">/_no_layout$/</span>
- <span class="ruby-identifier">detour_options</span>[<span class="ruby-identifier">:detour</span>].<span class="ruby-identifier">update</span>({<span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:action</span>] <span class="ruby-operator">+</span> <span class="ruby-value str">'_no_layout'</span>})
- <span class="ruby-keyword kw">end</span>
- <span class="ruby-keyword kw">elsif</span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:action</span>] <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/_no_layout$/</span>
- <span class="ruby-identifier">detour_options</span>[<span class="ruby-identifier">:detour</span>].<span class="ruby-identifier">update</span>({<span class="ruby-identifier">:action</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">params</span>[<span class="ruby-identifier">:action</span>][<span class="ruby-value">0</span><span class="ruby-operator">..</span><span class="ruby-value">-11</span>]})
+ <pre><span class="ruby-comment cmt"># File app/helpers/application_helper.rb, line 41</span>
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">back_or_link_to</span>(<span class="ruby-identifier">title</span>, <span class="ruby-identifier">options</span>)
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">session</span>[<span class="ruby-identifier">:detours</span>]
+ <span class="ruby-identifier">options</span> = {<span class="ruby-identifier">:return_from_detour</span> =<span class="ruby-operator">></span> <span class="ruby-keyword kw">true</span>}.<span class="ruby-identifier">update</span>(<span class="ruby-identifier">session</span>[<span class="ruby-identifier">:detours</span>].<span class="ruby-identifier">last</span>)
+ <span class="ruby-identifier">logger</span>.<span class="ruby-identifier">debug</span> <span class="ruby-node">"linked return from detour: #{options}"</span>
<span class="ruby-keyword kw">end</span>
- <span class="ruby-identifier">detour_options</span>
+ <span class="ruby-identifier">link_to</span> <span class="ruby-identifier">title</span>, <span class="ruby-identifier">options</span>
<span class="ruby-keyword kw">end</span></pre>
</body>
</html>
\ No newline at end of file