/
ActMethod.html
86 lines (83 loc) · 4.16 KB
/
ActMethod.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang='en'>
<head>
<title>Module: InheritViews::ActMethod [inherit_views API Docs (e5ad25a)]</title>
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type'>
<link href='../.././rdoc-style.css' media='screen' rel='stylesheet' type='text/css'>
<script type='text/javascript'>
//<![CDATA[
function popupCode(url) {
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
}
function toggleCode(id) {
var code = document.getElementById(id)
code.style.display = code.style.display != 'block' ? 'block' : 'none'
return true
}
// Make codeblocks hidden by default
document.writeln('<' + 'style type="text/css">.method .source pre { display: none }<\/style>')
//]]>
</script>
</head>
<body class='page'>
<div class='class' id='wrapper'>
<div class='header'>
<h1 class='name'>
<span class='type'>Module</span>
InheritViews::ActMethod
</h1>
<ol class='paths'>
<li>
<a href="../../files/lib/inherit_views_rb.html">lib/inherit_views.rb</a>
</li>
</ol>
</div>
<div id='content'>
<div id='text'>
<div id='description'>
<p>
class extension which enables specification of <a
href="ActMethod.html#M000009">inherit_views</a>
</p>
</div>
<div id='method-list'>
<h2>Methods</h2>
<h3>public instance</h3>
<ol>
<li><a href="#M000009">inherit_views</a></li>
</ol>
</div>
<div id='section'>
<div id='methods'>
<h2>Public instance methods</h2>
<div class='public-instance method' id='method-M000009'>
<a name='M000009'> </a>
<div class='synopsis'>
<span class='name'>inherit_views</span>
<span class='arguments'>(*paths)</span>
</div>
<div class='description'>
<p>
Specify this to have your controller or mailer inherit its views from the
specified path or the current controller/mailer’s default path if no
argument is given
</p>
</div>
<div class='source'>
<a class='source-toggle' href='#' onclick="toggleCode('M000009-source'); return false">
[show source]
</a>
<pre id='M000009-source'><span class="ruby-comment cmt"># File lib/inherit_views.rb, line 49</span>
 <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherit_views</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">paths</span>)
 <span class="ruby-identifier">class_eval</span> <span class="ruby-keyword kw">do</span>
 <span class="ruby-identifier">extend</span> <span class="ruby-constant">PathsContainer</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:inherit_views_paths</span>)
 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inherit_views</span> = <span class="ruby-keyword kw">true</span>
 <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">inherit_view_paths</span> = <span class="ruby-identifier">paths</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">paths</span>.<span class="ruby-identifier">any?</span>
 <span class="ruby-keyword kw">end</span>
 <span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
</div>
</div>
</div>
<div id='footer-push'></div>
</div>
<div id='footer'>
<a href="http://github.com/mislav/hanna/tree/master"><strong>Hanna</strong> RDoc template</a>
</div>
</body>
</html>