erubis 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES.txt +62 -2
- data/README.txt +1 -1
- data/benchmark/bench.rb +18 -10
- data/bin/erubis +1 -1
- data/contrib/erubis +2 -3318
- data/contrib/inline-require +1 -1
- data/doc-api/classes/ActionView.html +105 -0
- data/doc-api/classes/ActionView/TemplateHandlers/Erubis.html +202 -0
- data/doc-api/classes/Erubis.html +7 -1
- data/doc-api/classes/Erubis/ArrayBufferEnhancer.html +12 -12
- data/doc-api/classes/Erubis/ArrayEnhancer.html +12 -12
- data/doc-api/classes/Erubis/Basic/Converter.html +34 -30
- data/doc-api/classes/Erubis/BiPatternEnhancer.html +12 -12
- data/doc-api/classes/Erubis/CGenerator.html +60 -60
- data/doc-api/classes/Erubis/Context.html +42 -42
- data/doc-api/classes/Erubis/Converter.html +27 -27
- data/doc-api/classes/Erubis/DeleteIndentEnhancer.html +6 -6
- data/doc-api/classes/Erubis/Engine.html +40 -37
- data/doc-api/classes/Erubis/ErboutEnhancer.html +12 -12
- data/doc-api/classes/Erubis/EscapeEnhancer.html +6 -6
- data/doc-api/classes/Erubis/Evaluator.html +19 -19
- data/doc-api/classes/Erubis/Generator.html +60 -60
- data/doc-api/classes/Erubis/HeaderFooterEnhancer.html +12 -12
- data/doc-api/classes/Erubis/Helpers/RailsFormHelper.html +201 -176
- data/doc-api/classes/Erubis/Helpers/RailsHelper.html +58 -58
- data/doc-api/classes/Erubis/Helpers/RailsHelper/{PreprocessingEruby.html → TemplateConverter.html} +24 -37
- data/doc-api/classes/Erubis/InterpolationEnhancer.html +36 -35
- data/doc-api/classes/Erubis/JavaGenerator.html +54 -54
- data/doc-api/classes/Erubis/JavascriptGenerator.html +60 -60
- data/doc-api/classes/Erubis/Main.html +19 -19
- data/doc-api/classes/Erubis/NoCodeEnhancer.html +30 -30
- data/doc-api/classes/Erubis/NoTextEnhancer.html +6 -6
- data/doc-api/classes/Erubis/OptimizedEruby.html +6 -6
- data/doc-api/classes/Erubis/OptimizedGenerator.html +72 -72
- data/doc-api/classes/Erubis/OptimizedXmlEruby.html +6 -6
- data/doc-api/classes/Erubis/PI/Converter.html +21 -21
- data/doc-api/classes/Erubis/PI/Ec.html +6 -6
- data/doc-api/classes/Erubis/PI/Ejava.html +6 -6
- data/doc-api/classes/Erubis/PI/Ejavascript.html +6 -6
- data/doc-api/classes/Erubis/PI/Eperl.html +6 -6
- data/doc-api/classes/Erubis/PI/Ephp.html +6 -6
- data/doc-api/classes/Erubis/PI/Eruby.html +6 -6
- data/doc-api/classes/Erubis/PI/Escheme.html +6 -6
- data/doc-api/classes/Erubis/PI/TinyEruby.html +24 -24
- data/doc-api/classes/Erubis/PercentLineEnhancer.html +6 -6
- data/doc-api/classes/Erubis/PerlGenerator.html +54 -54
- data/doc-api/classes/Erubis/PhpGenerator.html +54 -54
- data/doc-api/classes/Erubis/PreprocessingEruby.html +183 -0
- data/doc-api/classes/Erubis/PreprocessingHelper.html +212 -0
- data/doc-api/classes/Erubis/PrintEnabledEnhancer.html +20 -20
- data/doc-api/classes/Erubis/PrintOutEnhancer.html +30 -30
- data/doc-api/classes/Erubis/RubyEvaluator.html +18 -18
- data/doc-api/classes/Erubis/RubyGenerator.html +48 -48
- data/doc-api/classes/Erubis/SchemeGenerator.html +60 -60
- data/doc-api/classes/Erubis/SimplifyEnhancer.html +7 -7
- data/doc-api/classes/Erubis/StdoutEnhancer.html +12 -12
- data/doc-api/classes/Erubis/StringBufferEnhancer.html +12 -12
- data/doc-api/classes/Erubis/TinyEruby.html +24 -24
- data/doc-api/classes/Erubis/XmlHelper.html +30 -30
- data/doc-api/created.rid +1 -1
- data/doc-api/files/README_txt.html +2 -2
- data/doc-api/files/erubis/context_rb.html +1 -1
- data/doc-api/files/erubis/converter_rb.html +2 -2
- data/doc-api/files/erubis/engine/ec_rb.html +1 -1
- data/doc-api/files/erubis/engine/ejava_rb.html +1 -1
- data/doc-api/files/erubis/engine/ejavascript_rb.html +1 -1
- data/doc-api/files/erubis/engine/enhanced_rb.html +1 -1
- data/doc-api/files/erubis/engine/eperl_rb.html +1 -1
- data/doc-api/files/erubis/engine/ephp_rb.html +1 -1
- data/doc-api/files/erubis/engine/eruby_rb.html +1 -1
- data/doc-api/files/erubis/engine/escheme_rb.html +1 -1
- data/doc-api/files/erubis/engine/optimized_rb.html +1 -1
- data/doc-api/files/erubis/engine_rb.html +2 -2
- data/doc-api/files/erubis/enhancer_rb.html +2 -2
- data/doc-api/files/erubis/error_rb.html +1 -1
- data/doc-api/files/erubis/evaluator_rb.html +1 -1
- data/doc-api/files/erubis/generator_rb.html +1 -1
- data/doc-api/files/erubis/helper_rb.html +1 -1
- data/doc-api/files/erubis/helpers/rails_form_helper_rb.html +2 -2
- data/doc-api/files/erubis/helpers/rails_helper_rb.html +3 -3
- data/doc-api/files/erubis/local-setting_rb.html +1 -1
- data/doc-api/files/erubis/main_rb.html +1 -1
- data/doc-api/files/erubis/preprocessing_rb.html +114 -0
- data/doc-api/files/erubis/tiny_rb.html +1 -1
- data/doc-api/files/erubis_rb.html +1 -1
- data/doc-api/fr_class_index.html +5 -1
- data/doc-api/fr_file_index.html +1 -0
- data/doc-api/fr_method_index.html +223 -213
- data/doc/users-guide.html +75 -6
- data/lib/erubis.rb +2 -2
- data/lib/erubis/context.rb +1 -1
- data/lib/erubis/converter.rb +11 -7
- data/lib/erubis/engine.rb +9 -6
- data/lib/erubis/engine/ec.rb +1 -1
- data/lib/erubis/engine/ejava.rb +1 -1
- data/lib/erubis/engine/ejavascript.rb +1 -1
- data/lib/erubis/engine/enhanced.rb +1 -1
- data/lib/erubis/engine/eperl.rb +1 -1
- data/lib/erubis/engine/ephp.rb +1 -1
- data/lib/erubis/engine/eruby.rb +1 -1
- data/lib/erubis/engine/escheme.rb +1 -1
- data/lib/erubis/engine/optimized.rb +1 -1
- data/lib/erubis/enhancer.rb +4 -3
- data/lib/erubis/error.rb +1 -1
- data/lib/erubis/evaluator.rb +1 -1
- data/lib/erubis/generator.rb +1 -1
- data/lib/erubis/helper.rb +1 -1
- data/lib/erubis/helpers/rails_form_helper.rb +18 -10
- data/lib/erubis/helpers/rails_helper.rb +100 -98
- data/lib/erubis/local-setting.rb +1 -1
- data/lib/erubis/main.rb +1 -1
- data/lib/erubis/preprocessing.rb +59 -0
- data/lib/erubis/tiny.rb +1 -1
- data/test/assert-text-equal.rb +1 -1
- data/test/data/users-guide/stderr.log +3 -0
- data/test/data/users-guide/tail_260.result +4 -0
- data/test/data/users-guide/tailnewline.rhtml +3 -0
- data/test/test-engines.rb +1 -1
- data/test/test-enhancers.rb +1 -1
- data/test/test-erubis.rb +44 -2
- data/test/test-main.rb +2 -2
- data/test/test-users-guide.rb +1 -1
- data/test/test.rb +1 -1
- data/test/testutil.rb +1 -1
- metadata +15 -5
- data/contrib/action_view_base_rb.patch +0 -23
@@ -139,8 +139,8 @@ this is language-independent.
|
|
139
139
|
<h3 class="section-bar">Methods</h3>
|
140
140
|
|
141
141
|
<div class="name-list">
|
142
|
-
<a href="#
|
143
|
-
<a href="#
|
142
|
+
<a href="#M000126">add_text</a>
|
143
|
+
<a href="#M000127">convert</a>
|
144
144
|
</div>
|
145
145
|
</div>
|
146
146
|
|
@@ -193,19 +193,19 @@ this is language-independent.
|
|
193
193
|
<div id="methods">
|
194
194
|
<h3 class="section-bar">Public Instance methods</h3>
|
195
195
|
|
196
|
-
<div id="method-
|
197
|
-
<a name="
|
196
|
+
<div id="method-M000126" class="method-detail">
|
197
|
+
<a name="M000126"></a>
|
198
198
|
|
199
199
|
<div class="method-heading">
|
200
|
-
<a href="#
|
200
|
+
<a href="#M000126" class="method-signature">
|
201
201
|
<span class="method-name">add_text</span><span class="method-args">(src, text)</span>
|
202
202
|
</a>
|
203
203
|
</div>
|
204
204
|
|
205
205
|
<div class="method-description">
|
206
206
|
<p><a class="source-toggle" href="#"
|
207
|
-
onclick="toggleCode('
|
208
|
-
<div class="method-source-code" id="
|
207
|
+
onclick="toggleCode('M000126-source');return false;">[Source]</a></p>
|
208
|
+
<div class="method-source-code" id="M000126-source">
|
209
209
|
<pre>
|
210
210
|
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 537</span>
|
211
211
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_text</span>(<span class="ruby-identifier">src</span>, <span class="ruby-identifier">text</span>)
|
@@ -225,19 +225,19 @@ this is language-independent.
|
|
225
225
|
</div>
|
226
226
|
</div>
|
227
227
|
|
228
|
-
<div id="method-
|
229
|
-
<a name="
|
228
|
+
<div id="method-M000127" class="method-detail">
|
229
|
+
<a name="M000127"></a>
|
230
230
|
|
231
231
|
<div class="method-heading">
|
232
|
-
<a href="#
|
232
|
+
<a href="#M000127" class="method-signature">
|
233
233
|
<span class="method-name">convert</span><span class="method-args">(input)</span>
|
234
234
|
</a>
|
235
235
|
</div>
|
236
236
|
|
237
237
|
<div class="method-description">
|
238
238
|
<p><a class="source-toggle" href="#"
|
239
|
-
onclick="toggleCode('
|
240
|
-
<div class="method-source-code" id="
|
239
|
+
onclick="toggleCode('M000127-source');return false;">[Source]</a></p>
|
240
|
+
<div class="method-source-code" id="M000127-source">
|
241
241
|
<pre>
|
242
242
|
<span class="ruby-comment cmt"># File erubis/enhancer.rb, line 552</span>
|
243
243
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">convert</span>(<span class="ruby-identifier">input</span>)
|
@@ -80,30 +80,31 @@
|
|
80
80
|
<h3 class="section-bar">Methods</h3>
|
81
81
|
|
82
82
|
<div class="name-list">
|
83
|
-
<a href="#
|
84
|
-
<a href="#
|
85
|
-
<a href="#
|
86
|
-
<a href="#
|
87
|
-
<a href="#
|
88
|
-
<a href="#
|
89
|
-
<a href="#
|
90
|
-
<a href="#
|
91
|
-
<a href="#
|
92
|
-
<a href="#
|
93
|
-
<a href="#
|
94
|
-
<a href="#
|
95
|
-
<a href="#
|
96
|
-
<a href="#
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
99
|
-
<a href="#
|
100
|
-
<a href="#
|
101
|
-
<a href="#
|
102
|
-
<a href="#
|
103
|
-
<a href="#
|
104
|
-
<a href="#
|
105
|
-
<a href="#
|
106
|
-
<a href="#
|
83
|
+
<a href="#M000109">_pp_check_box_checked?</a>
|
84
|
+
<a href="#M000099">_pp_error_tags</a>
|
85
|
+
<a href="#M000111">_pp_radio_button_checked?</a>
|
86
|
+
<a href="#M000100">_pp_remove_error_div</a>
|
87
|
+
<a href="#M000112">_pp_select</a>
|
88
|
+
<a href="#M000113">_pp_select_options</a>
|
89
|
+
<a href="#M000108">pp_check_box</a>
|
90
|
+
<a href="#M000115">pp_collection_select</a>
|
91
|
+
<a href="#M000116">pp_country_select</a>
|
92
|
+
<a href="#M000098">pp_error_on</a>
|
93
|
+
<a href="#M000106">pp_file_field</a>
|
94
|
+
<a href="#M000102">pp_form_tag</a>
|
95
|
+
<a href="#M000105">pp_hidden_field</a>
|
96
|
+
<a href="#M000119">pp_image_submit_tag</a>
|
97
|
+
<a href="#M000104">pp_password_field</a>
|
98
|
+
<a href="#M000110">pp_radio_button</a>
|
99
|
+
<a href="#M000097">pp_render_partial</a>
|
100
|
+
<a href="#M000114">pp_select</a>
|
101
|
+
<a href="#M000118">pp_submit_tag</a>
|
102
|
+
<a href="#M000101">pp_tag_helper</a>
|
103
|
+
<a href="#M000096">pp_template_filename</a>
|
104
|
+
<a href="#M000095">pp_template_filename</a>
|
105
|
+
<a href="#M000107">pp_text_area</a>
|
106
|
+
<a href="#M000103">pp_text_field</a>
|
107
|
+
<a href="#M000117">pp_time_zone_select</a>
|
107
108
|
</div>
|
108
109
|
</div>
|
109
110
|
|
@@ -125,21 +126,21 @@
|
|
125
126
|
<div id="methods">
|
126
127
|
<h3 class="section-bar">Public Instance methods</h3>
|
127
128
|
|
128
|
-
<div id="method-
|
129
|
-
<a name="
|
129
|
+
<div id="method-M000109" class="method-detail">
|
130
|
+
<a name="M000109"></a>
|
130
131
|
|
131
132
|
<div class="method-heading">
|
132
|
-
<a href="#
|
133
|
+
<a href="#M000109" class="method-signature">
|
133
134
|
<span class="method-name">_pp_check_box_checked?</span><span class="method-args">(value, checked_value)</span>
|
134
135
|
</a>
|
135
136
|
</div>
|
136
137
|
|
137
138
|
<div class="method-description">
|
138
139
|
<p><a class="source-toggle" href="#"
|
139
|
-
onclick="toggleCode('
|
140
|
-
<div class="method-source-code" id="
|
140
|
+
onclick="toggleCode('M000109-source');return false;">[Source]</a></p>
|
141
|
+
<div class="method-source-code" id="M000109-source">
|
141
142
|
<pre>
|
142
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
143
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 107</span>
|
143
144
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_check_box_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">checked_value</span>)
|
144
145
|
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceTag</span><span class="ruby-operator">::</span><span class="ruby-identifier">check_box_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">checked_value</span>)
|
145
146
|
<span class="ruby-keyword kw">end</span>
|
@@ -148,21 +149,21 @@
|
|
148
149
|
</div>
|
149
150
|
</div>
|
150
151
|
|
151
|
-
<div id="method-
|
152
|
-
<a name="
|
152
|
+
<div id="method-M000099" class="method-detail">
|
153
|
+
<a name="M000099"></a>
|
153
154
|
|
154
155
|
<div class="method-heading">
|
155
|
-
<a href="#
|
156
|
+
<a href="#M000099" class="method-signature">
|
156
157
|
<span class="method-name">_pp_error_tags</span><span class="method-args">(value)</span>
|
157
158
|
</a>
|
158
159
|
</div>
|
159
160
|
|
160
161
|
<div class="method-description">
|
161
162
|
<p><a class="source-toggle" href="#"
|
162
|
-
onclick="toggleCode('
|
163
|
-
<div class="method-source-code" id="
|
163
|
+
onclick="toggleCode('M000099-source');return false;">[Source]</a></p>
|
164
|
+
<div class="method-source-code" id="M000099-source">
|
164
165
|
<pre>
|
165
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
166
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 47</span>
|
166
167
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_error_tags</span>(<span class="ruby-identifier">value</span>)
|
167
168
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">?</span> [<span class="ruby-value str">'<div class="fieldWithErrors">'</span>, <span class="ruby-value str">'</div>'</span>] <span class="ruby-operator">:</span> [<span class="ruby-value str">''</span>, <span class="ruby-value str">''</span>]
|
168
169
|
<span class="ruby-keyword kw">end</span>
|
@@ -171,21 +172,21 @@
|
|
171
172
|
</div>
|
172
173
|
</div>
|
173
174
|
|
174
|
-
<div id="method-
|
175
|
-
<a name="
|
175
|
+
<div id="method-M000111" class="method-detail">
|
176
|
+
<a name="M000111"></a>
|
176
177
|
|
177
178
|
<div class="method-heading">
|
178
|
-
<a href="#
|
179
|
+
<a href="#M000111" class="method-signature">
|
179
180
|
<span class="method-name">_pp_radio_button_checked?</span><span class="method-args">(value, tag_value)</span>
|
180
181
|
</a>
|
181
182
|
</div>
|
182
183
|
|
183
184
|
<div class="method-description">
|
184
185
|
<p><a class="source-toggle" href="#"
|
185
|
-
onclick="toggleCode('
|
186
|
-
<div class="method-source-code" id="
|
186
|
+
onclick="toggleCode('M000111-source');return false;">[Source]</a></p>
|
187
|
+
<div class="method-source-code" id="M000111-source">
|
187
188
|
<pre>
|
188
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
189
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 118</span>
|
189
190
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_radio_button_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">tag_value</span>)
|
190
191
|
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">InstanceTag</span><span class="ruby-operator">::</span><span class="ruby-identifier">radio_button_checked?</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">tag_value</span>)
|
191
192
|
<span class="ruby-keyword kw">end</span>
|
@@ -194,21 +195,21 @@
|
|
194
195
|
</div>
|
195
196
|
</div>
|
196
197
|
|
197
|
-
<div id="method-
|
198
|
-
<a name="
|
198
|
+
<div id="method-M000100" class="method-detail">
|
199
|
+
<a name="M000100"></a>
|
199
200
|
|
200
201
|
<div class="method-heading">
|
201
|
-
<a href="#
|
202
|
+
<a href="#M000100" class="method-signature">
|
202
203
|
<span class="method-name">_pp_remove_error_div</span><span class="method-args">(s)</span>
|
203
204
|
</a>
|
204
205
|
</div>
|
205
206
|
|
206
207
|
<div class="method-description">
|
207
208
|
<p><a class="source-toggle" href="#"
|
208
|
-
onclick="toggleCode('
|
209
|
-
<div class="method-source-code" id="
|
209
|
+
onclick="toggleCode('M000100-source');return false;">[Source]</a></p>
|
210
|
+
<div class="method-source-code" id="M000100-source">
|
210
211
|
<pre>
|
211
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
212
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 51</span>
|
212
213
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_remove_error_div</span>(<span class="ruby-identifier">s</span>)
|
213
214
|
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\A<div class="fieldWithErrors">(.*)<\/div>\z/</span>, <span class="ruby-value str">'\1'</span>)
|
214
215
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>
|
@@ -218,21 +219,21 @@
|
|
218
219
|
</div>
|
219
220
|
</div>
|
220
221
|
|
221
|
-
<div id="method-
|
222
|
-
<a name="
|
222
|
+
<div id="method-M000112" class="method-detail">
|
223
|
+
<a name="M000112"></a>
|
223
224
|
|
224
225
|
<div class="method-heading">
|
225
|
-
<a href="#
|
226
|
+
<a href="#M000112" class="method-signature">
|
226
227
|
<span class="method-name">_pp_select</span><span class="method-args">(object, method, collection, priority_collection, options={}, html_options={})</span>
|
227
228
|
</a>
|
228
229
|
</div>
|
229
230
|
|
230
231
|
<div class="method-description">
|
231
232
|
<p><a class="source-toggle" href="#"
|
232
|
-
onclick="toggleCode('
|
233
|
-
<div class="method-source-code" id="
|
233
|
+
onclick="toggleCode('M000112-source');return false;">[Source]</a></p>
|
234
|
+
<div class="method-source-code" id="M000112-source">
|
234
235
|
<pre>
|
235
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
236
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 122</span>
|
236
237
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">priority_collection</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
237
238
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>) <span class="ruby-keyword kw">do</span>
|
238
239
|
<span class="ruby-identifier">s</span> = <span class="ruby-value str">""</span>
|
@@ -269,21 +270,21 @@
|
|
269
270
|
</div>
|
270
271
|
</div>
|
271
272
|
|
272
|
-
<div id="method-
|
273
|
-
<a name="
|
273
|
+
<div id="method-M000113" class="method-detail">
|
274
|
+
<a name="M000113"></a>
|
274
275
|
|
275
276
|
<div class="method-heading">
|
276
|
-
<a href="#
|
277
|
+
<a href="#M000113" class="method-signature">
|
277
278
|
<span class="method-name">_pp_select_options</span><span class="method-args">(s, collection, selected, operator)</span>
|
278
279
|
</a>
|
279
280
|
</div>
|
280
281
|
|
281
282
|
<div class="method-description">
|
282
283
|
<p><a class="source-toggle" href="#"
|
283
|
-
onclick="toggleCode('
|
284
|
-
<div class="method-source-code" id="
|
284
|
+
onclick="toggleCode('M000113-source');return false;">[Source]</a></p>
|
285
|
+
<div class="method-source-code" id="M000113-source">
|
285
286
|
<pre>
|
286
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
287
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 154</span>
|
287
288
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">_pp_select_options</span>(<span class="ruby-identifier">s</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">selected</span>, <span class="ruby-identifier">operator</span>)
|
288
289
|
<span class="ruby-keyword kw">for</span> <span class="ruby-identifier">item</span> <span class="ruby-keyword kw">in</span> <span class="ruby-identifier">collection</span>
|
289
290
|
<span class="ruby-identifier">value</span>, <span class="ruby-identifier">text</span> = <span class="ruby-identifier">item</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">item</span> <span class="ruby-operator">:</span> [<span class="ruby-identifier">item</span>, <span class="ruby-identifier">item</span>]
|
@@ -302,21 +303,21 @@
|
|
302
303
|
</div>
|
303
304
|
</div>
|
304
305
|
|
305
|
-
<div id="method-
|
306
|
-
<a name="
|
306
|
+
<div id="method-M000108" class="method-detail">
|
307
|
+
<a name="M000108"></a>
|
307
308
|
|
308
309
|
<div class="method-heading">
|
309
|
-
<a href="#
|
310
|
+
<a href="#M000108" class="method-signature">
|
310
311
|
<span class="method-name">pp_check_box</span><span class="method-args">(object_name, method, options={}, checked_value="1", unchecked_value="0")</span>
|
311
312
|
</a>
|
312
313
|
</div>
|
313
314
|
|
314
315
|
<div class="method-description">
|
315
316
|
<p><a class="source-toggle" href="#"
|
316
|
-
onclick="toggleCode('
|
317
|
-
<div class="method-source-code" id="
|
317
|
+
onclick="toggleCode('M000108-source');return false;">[Source]</a></p>
|
318
|
+
<div class="method-source-code" id="M000108-source">
|
318
319
|
<pre>
|
319
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
320
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 100</span>
|
320
321
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_check_box</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">checked_value</span>=<span class="ruby-value str">"1"</span>, <span class="ruby-identifier">unchecked_value</span>=<span class="ruby-value str">"0"</span>)
|
321
322
|
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">check_box</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">checked_value</span>, <span class="ruby-identifier">unchecked_value</span>)
|
322
323
|
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\schecked=\"checked\"/</span>, <span class="ruby-value str">''</span>)
|
@@ -328,21 +329,21 @@
|
|
328
329
|
</div>
|
329
330
|
</div>
|
330
331
|
|
331
|
-
<div id="method-
|
332
|
-
<a name="
|
332
|
+
<div id="method-M000115" class="method-detail">
|
333
|
+
<a name="M000115"></a>
|
333
334
|
|
334
335
|
<div class="method-heading">
|
335
|
-
<a href="#
|
336
|
+
<a href="#M000115" class="method-signature">
|
336
337
|
<span class="method-name">pp_collection_select</span><span class="method-args">(object, method, collection, value_method, text_method, options={}, html_options={})</span>
|
337
338
|
</a>
|
338
339
|
</div>
|
339
340
|
|
340
341
|
<div class="method-description">
|
341
342
|
<p><a class="source-toggle" href="#"
|
342
|
-
onclick="toggleCode('
|
343
|
-
<div class="method-source-code" id="
|
343
|
+
onclick="toggleCode('M000115-source');return false;">[Source]</a></p>
|
344
|
+
<div class="method-source-code" id="M000115-source">
|
344
345
|
<pre>
|
345
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
346
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 172</span>
|
346
347
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_collection_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">value_method</span>, <span class="ruby-identifier">text_method</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
347
348
|
<span class="ruby-identifier">collection2</span> = <span class="ruby-identifier">collection</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span>
|
348
349
|
[<span class="ruby-identifier">e</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">value_method</span>), <span class="ruby-identifier">e</span>.<span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">text_method</span>)]
|
@@ -354,21 +355,21 @@
|
|
354
355
|
</div>
|
355
356
|
</div>
|
356
357
|
|
357
|
-
<div id="method-
|
358
|
-
<a name="
|
358
|
+
<div id="method-M000116" class="method-detail">
|
359
|
+
<a name="M000116"></a>
|
359
360
|
|
360
361
|
<div class="method-heading">
|
361
|
-
<a href="#
|
362
|
+
<a href="#M000116" class="method-signature">
|
362
363
|
<span class="method-name">pp_country_select</span><span class="method-args">(object, method, priority_countries=nil, options={}, html_options={})</span>
|
363
364
|
</a>
|
364
365
|
</div>
|
365
366
|
|
366
367
|
<div class="method-description">
|
367
368
|
<p><a class="source-toggle" href="#"
|
368
|
-
onclick="toggleCode('
|
369
|
-
<div class="method-source-code" id="
|
369
|
+
onclick="toggleCode('M000116-source');return false;">[Source]</a></p>
|
370
|
+
<div class="method-source-code" id="M000116-source">
|
370
371
|
<pre>
|
371
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
372
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 179</span>
|
372
373
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_country_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">priority_countries</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
373
374
|
<span class="ruby-identifier">collection</span> = <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">FormOptionsHelper</span><span class="ruby-operator">::</span><span class="ruby-constant">COUNTRIES</span>
|
374
375
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">priority_countries</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
|
@@ -378,27 +379,27 @@
|
|
378
379
|
</div>
|
379
380
|
</div>
|
380
381
|
|
381
|
-
<div id="method-
|
382
|
-
<a name="
|
382
|
+
<div id="method-M000098" class="method-detail">
|
383
|
+
<a name="M000098"></a>
|
383
384
|
|
384
385
|
<div class="method-heading">
|
385
|
-
<a href="#
|
386
|
+
<a href="#M000098" class="method-signature">
|
386
387
|
<span class="method-name">pp_error_on</span><span class="method-args">(object_name, method) {|object_name, method| ...}</span>
|
387
388
|
</a>
|
388
389
|
</div>
|
389
390
|
|
390
391
|
<div class="method-description">
|
391
392
|
<p><a class="source-toggle" href="#"
|
392
|
-
onclick="toggleCode('
|
393
|
-
<div class="method-source-code" id="
|
393
|
+
onclick="toggleCode('M000098-source');return false;">[Source]</a></p>
|
394
|
+
<div class="method-source-code" id="M000098-source">
|
394
395
|
<pre>
|
395
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
396
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span
|
396
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 38</span>
|
397
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>)
|
397
398
|
<span class="ruby-identifier">s</span> = <span class="ruby-value str">''</span>
|
398
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<% _stag, _etag = _pp_error_tags(@#{object_name}.errors.on('#{method}'))%>"</span>
|
399
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<%=_stag%>"</span>
|
399
|
+
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-node">"<% _stag, _etag = _pp_error_tags(@#{object_name}.errors.on('#{method}')) %>"</span>
|
400
|
+
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<%= _stag %>"</span>
|
400
401
|
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-keyword kw">yield</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>)
|
401
|
-
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<%=_etag%>"</span>
|
402
|
+
<span class="ruby-identifier">s</span> <span class="ruby-operator"><<</span> <span class="ruby-value str">"<%= _etag %>"</span>
|
402
403
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">s</span>
|
403
404
|
<span class="ruby-keyword kw">end</span>
|
404
405
|
</pre>
|
@@ -406,21 +407,21 @@
|
|
406
407
|
</div>
|
407
408
|
</div>
|
408
409
|
|
409
|
-
<div id="method-
|
410
|
-
<a name="
|
410
|
+
<div id="method-M000106" class="method-detail">
|
411
|
+
<a name="M000106"></a>
|
411
412
|
|
412
413
|
<div class="method-heading">
|
413
|
-
<a href="#
|
414
|
+
<a href="#M000106" class="method-signature">
|
414
415
|
<span class="method-name">pp_file_field</span><span class="method-args">(object_name, method, options={})</span>
|
415
416
|
</a>
|
416
417
|
</div>
|
417
418
|
|
418
419
|
<div class="method-description">
|
419
420
|
<p><a class="source-toggle" href="#"
|
420
|
-
onclick="toggleCode('
|
421
|
-
<div class="method-source-code" id="
|
421
|
+
onclick="toggleCode('M000106-source');return false;">[Source]</a></p>
|
422
|
+
<div class="method-source-code" id="M000106-source">
|
422
423
|
<pre>
|
423
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
424
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 92</span>
|
424
425
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_file_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
425
426
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:file_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
426
427
|
<span class="ruby-keyword kw">end</span>
|
@@ -429,21 +430,21 @@
|
|
429
430
|
</div>
|
430
431
|
</div>
|
431
432
|
|
432
|
-
<div id="method-
|
433
|
-
<a name="
|
433
|
+
<div id="method-M000102" class="method-detail">
|
434
|
+
<a name="M000102"></a>
|
434
435
|
|
435
436
|
<div class="method-heading">
|
436
|
-
<a href="#
|
437
|
+
<a href="#M000102" class="method-signature">
|
437
438
|
<span class="method-name">pp_form_tag</span><span class="method-args">(url_for_options={}, options={}, *parameters_for_url, &block)</span>
|
438
439
|
</a>
|
439
440
|
</div>
|
440
441
|
|
441
442
|
<div class="method-description">
|
442
443
|
<p><a class="source-toggle" href="#"
|
443
|
-
onclick="toggleCode('
|
444
|
-
<div class="method-source-code" id="
|
444
|
+
onclick="toggleCode('M000102-source');return false;">[Source]</a></p>
|
445
|
+
<div class="method-source-code" id="M000102-source">
|
445
446
|
<pre>
|
446
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
447
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 70</span>
|
447
448
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_form_tag</span>(<span class="ruby-identifier">url_for_options</span>={}, <span class="ruby-identifier">options</span>={}, <span class="ruby-operator">*</span><span class="ruby-identifier">parameters_for_url</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
448
449
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">form_tag</span>(<span class="ruby-identifier">url_for_options</span>, <span class="ruby-identifier">options</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">parameters_for_url</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
449
450
|
<span class="ruby-keyword kw">end</span>
|
@@ -452,21 +453,21 @@
|
|
452
453
|
</div>
|
453
454
|
</div>
|
454
455
|
|
455
|
-
<div id="method-
|
456
|
-
<a name="
|
456
|
+
<div id="method-M000105" class="method-detail">
|
457
|
+
<a name="M000105"></a>
|
457
458
|
|
458
459
|
<div class="method-heading">
|
459
|
-
<a href="#
|
460
|
+
<a href="#M000105" class="method-signature">
|
460
461
|
<span class="method-name">pp_hidden_field</span><span class="method-args">(object_name, method, options={})</span>
|
461
462
|
</a>
|
462
463
|
</div>
|
463
464
|
|
464
465
|
<div class="method-description">
|
465
466
|
<p><a class="source-toggle" href="#"
|
466
|
-
onclick="toggleCode('
|
467
|
-
<div class="method-source-code" id="
|
467
|
+
onclick="toggleCode('M000105-source');return false;">[Source]</a></p>
|
468
|
+
<div class="method-source-code" id="M000105-source">
|
468
469
|
<pre>
|
469
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
470
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 88</span>
|
470
471
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_hidden_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
471
472
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:hidden_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
472
473
|
<span class="ruby-keyword kw">end</span>
|
@@ -475,21 +476,21 @@
|
|
475
476
|
</div>
|
476
477
|
</div>
|
477
478
|
|
478
|
-
<div id="method-
|
479
|
-
<a name="
|
479
|
+
<div id="method-M000119" class="method-detail">
|
480
|
+
<a name="M000119"></a>
|
480
481
|
|
481
482
|
<div class="method-heading">
|
482
|
-
<a href="#
|
483
|
+
<a href="#M000119" class="method-signature">
|
483
484
|
<span class="method-name">pp_image_submit_tag</span><span class="method-args">(source, options={})</span>
|
484
485
|
</a>
|
485
486
|
</div>
|
486
487
|
|
487
488
|
<div class="method-description">
|
488
489
|
<p><a class="source-toggle" href="#"
|
489
|
-
onclick="toggleCode('
|
490
|
-
<div class="method-source-code" id="
|
490
|
+
onclick="toggleCode('M000119-source');return false;">[Source]</a></p>
|
491
|
+
<div class="method-source-code" id="M000119-source">
|
491
492
|
<pre>
|
492
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
493
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 194</span>
|
493
494
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_image_submit_tag</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span>={})
|
494
495
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">image_submit_tag</span>(<span class="ruby-identifier">source</span>, <span class="ruby-identifier">options</span>)
|
495
496
|
<span class="ruby-keyword kw">end</span>
|
@@ -498,21 +499,21 @@
|
|
498
499
|
</div>
|
499
500
|
</div>
|
500
501
|
|
501
|
-
<div id="method-
|
502
|
-
<a name="
|
502
|
+
<div id="method-M000104" class="method-detail">
|
503
|
+
<a name="M000104"></a>
|
503
504
|
|
504
505
|
<div class="method-heading">
|
505
|
-
<a href="#
|
506
|
+
<a href="#M000104" class="method-signature">
|
506
507
|
<span class="method-name">pp_password_field</span><span class="method-args">(object_name, method, options={})</span>
|
507
508
|
</a>
|
508
509
|
</div>
|
509
510
|
|
510
511
|
<div class="method-description">
|
511
512
|
<p><a class="source-toggle" href="#"
|
512
|
-
onclick="toggleCode('
|
513
|
-
<div class="method-source-code" id="
|
513
|
+
onclick="toggleCode('M000104-source');return false;">[Source]</a></p>
|
514
|
+
<div class="method-source-code" id="M000104-source">
|
514
515
|
<pre>
|
515
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
516
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 84</span>
|
516
517
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_password_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
517
518
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:password_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
518
519
|
<span class="ruby-keyword kw">end</span>
|
@@ -521,21 +522,21 @@
|
|
521
522
|
</div>
|
522
523
|
</div>
|
523
524
|
|
524
|
-
<div id="method-
|
525
|
-
<a name="
|
525
|
+
<div id="method-M000110" class="method-detail">
|
526
|
+
<a name="M000110"></a>
|
526
527
|
|
527
528
|
<div class="method-heading">
|
528
|
-
<a href="#
|
529
|
+
<a href="#M000110" class="method-signature">
|
529
530
|
<span class="method-name">pp_radio_button</span><span class="method-args">(object_name, method, tag_value, options={})</span>
|
530
531
|
</a>
|
531
532
|
</div>
|
532
533
|
|
533
534
|
<div class="method-description">
|
534
535
|
<p><a class="source-toggle" href="#"
|
535
|
-
onclick="toggleCode('
|
536
|
-
<div class="method-source-code" id="
|
536
|
+
onclick="toggleCode('M000110-source');return false;">[Source]</a></p>
|
537
|
+
<div class="method-source-code" id="M000110-source">
|
537
538
|
<pre>
|
538
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
539
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 111</span>
|
539
540
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_radio_button</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">tag_value</span>, <span class="ruby-identifier">options</span>={})
|
540
541
|
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">radio_button</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">tag_value</span>, <span class="ruby-identifier">options</span>)
|
541
542
|
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">sub!</span>(<span class="ruby-regexp re">/\schecked=\"checked\"/</span>, <span class="ruby-value str">''</span>)
|
@@ -547,48 +548,47 @@
|
|
547
548
|
</div>
|
548
549
|
</div>
|
549
550
|
|
550
|
-
<div id="method-
|
551
|
-
<a name="
|
551
|
+
<div id="method-M000097" class="method-detail">
|
552
|
+
<a name="M000097"></a>
|
552
553
|
|
553
554
|
<div class="method-heading">
|
554
|
-
<a href="#
|
555
|
+
<a href="#M000097" class="method-signature">
|
555
556
|
<span class="method-name">pp_render_partial</span><span class="method-args">(basename)</span>
|
556
557
|
</a>
|
557
558
|
</div>
|
558
559
|
|
559
560
|
<div class="method-description">
|
560
561
|
<p><a class="source-toggle" href="#"
|
561
|
-
onclick="toggleCode('
|
562
|
-
<div class="method-source-code" id="
|
562
|
+
onclick="toggleCode('M000097-source');return false;">[Source]</a></p>
|
563
|
+
<div class="method-source-code" id="M000097-source">
|
563
564
|
<pre>
|
564
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
565
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 31</span>
|
565
566
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_render_partial</span>(<span class="ruby-identifier">basename</span>)
|
566
567
|
<span class="ruby-identifier">basename</span> = <span class="ruby-node">"_#{basename}"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">basename</span>[<span class="ruby-value">0</span>] <span class="ruby-operator">==</span> <span class="ruby-value">?_</span>
|
567
568
|
<span class="ruby-identifier">filename</span> = <span class="ruby-identifier">pp_template_filename</span>(<span class="ruby-identifier">basename</span>)
|
568
|
-
<span class="ruby-identifier">
|
569
|
-
<span class="ruby-
|
570
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">eruby</span>.<span class="ruby-identifier">evaluate</span>(<span class="ruby-keyword kw">self</span>)
|
569
|
+
<span class="ruby-identifier">preprocessor</span> = <span class="ruby-identifier">_create_preprocessor</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">read</span>(<span class="ruby-identifier">filename</span>))
|
570
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">preprocessor</span>.<span class="ruby-identifier">evaluate</span>(<span class="ruby-identifier">_preprocessing_context_object</span>())
|
571
571
|
<span class="ruby-keyword kw">end</span>
|
572
572
|
</pre>
|
573
573
|
</div>
|
574
574
|
</div>
|
575
575
|
</div>
|
576
576
|
|
577
|
-
<div id="method-
|
578
|
-
<a name="
|
577
|
+
<div id="method-M000114" class="method-detail">
|
578
|
+
<a name="M000114"></a>
|
579
579
|
|
580
580
|
<div class="method-heading">
|
581
|
-
<a href="#
|
581
|
+
<a href="#M000114" class="method-signature">
|
582
582
|
<span class="method-name">pp_select</span><span class="method-args">(object, method, collection, options={}, html_options={})</span>
|
583
583
|
</a>
|
584
584
|
</div>
|
585
585
|
|
586
586
|
<div class="method-description">
|
587
587
|
<p><a class="source-toggle" href="#"
|
588
|
-
onclick="toggleCode('
|
589
|
-
<div class="method-source-code" id="
|
588
|
+
onclick="toggleCode('M000114-source');return false;">[Source]</a></p>
|
589
|
+
<div class="method-source-code" id="M000114-source">
|
590
590
|
<pre>
|
591
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
591
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 168</span>
|
592
592
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
593
593
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">_pp_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">collection</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
|
594
594
|
<span class="ruby-keyword kw">end</span>
|
@@ -597,21 +597,21 @@
|
|
597
597
|
</div>
|
598
598
|
</div>
|
599
599
|
|
600
|
-
<div id="method-
|
601
|
-
<a name="
|
600
|
+
<div id="method-M000118" class="method-detail">
|
601
|
+
<a name="M000118"></a>
|
602
602
|
|
603
603
|
<div class="method-heading">
|
604
|
-
<a href="#
|
604
|
+
<a href="#M000118" class="method-signature">
|
605
605
|
<span class="method-name">pp_submit_tag</span><span class="method-args">(value="Save changes", options={})</span>
|
606
606
|
</a>
|
607
607
|
</div>
|
608
608
|
|
609
609
|
<div class="method-description">
|
610
610
|
<p><a class="source-toggle" href="#"
|
611
|
-
onclick="toggleCode('
|
612
|
-
<div class="method-source-code" id="
|
611
|
+
onclick="toggleCode('M000118-source');return false;">[Source]</a></p>
|
612
|
+
<div class="method-source-code" id="M000118-source">
|
613
613
|
<pre>
|
614
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
614
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 190</span>
|
615
615
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_submit_tag</span>(<span class="ruby-identifier">value</span>=<span class="ruby-value str">"Save changes"</span>, <span class="ruby-identifier">options</span>={})
|
616
616
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">submit_tag</span>(<span class="ruby-identifier">value</span>, <span class="ruby-identifier">options</span>)
|
617
617
|
<span class="ruby-keyword kw">end</span>
|
@@ -620,21 +620,21 @@
|
|
620
620
|
</div>
|
621
621
|
</div>
|
622
622
|
|
623
|
-
<div id="method-
|
624
|
-
<a name="
|
623
|
+
<div id="method-M000101" class="method-detail">
|
624
|
+
<a name="M000101"></a>
|
625
625
|
|
626
626
|
<div class="method-heading">
|
627
|
-
<a href="#
|
627
|
+
<a href="#M000101" class="method-signature">
|
628
628
|
<span class="method-name">pp_tag_helper</span><span class="method-args">(helper, object_name, method, options={})</span>
|
629
629
|
</a>
|
630
630
|
</div>
|
631
631
|
|
632
632
|
<div class="method-description">
|
633
633
|
<p><a class="source-toggle" href="#"
|
634
|
-
onclick="toggleCode('
|
635
|
-
<div class="method-source-code" id="
|
634
|
+
onclick="toggleCode('M000101-source');return false;">[Source]</a></p>
|
635
|
+
<div class="method-source-code" id="M000101-source">
|
636
636
|
<pre>
|
637
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
637
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 56</span>
|
638
638
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">helper</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
639
639
|
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">object_name</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">Helpers</span><span class="ruby-operator">::</span><span class="ruby-constant">FormHelper</span>)
|
640
640
|
<span class="ruby-identifier">object_name</span> = <span class="ruby-identifier">object_name</span>.<span class="ruby-identifier">object_name</span>
|
@@ -642,7 +642,7 @@
|
|
642
642
|
<span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:value</span>) <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-value str">'value'</span>)
|
643
643
|
<span class="ruby-identifier">options</span>[<span class="ruby-value str">'value'</span>] = <span class="ruby-identifier">_?</span>(<span class="ruby-node">"h @#{object_name}.#{method}"</span>)
|
644
644
|
<span class="ruby-keyword kw">end</span>
|
645
|
-
<span class="ruby-
|
645
|
+
<span class="ruby-comment cmt">#$stderr.puts "*** debug: pp_tag_helper(): options=#{options.inspect}"</span>
|
646
646
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_error_on</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>) {
|
647
647
|
<span class="ruby-identifier">s</span> = <span class="ruby-identifier">__send__</span>(<span class="ruby-identifier">helper</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
648
648
|
<span class="ruby-identifier">_pp_remove_error_div</span>(<span class="ruby-identifier">s</span>)
|
@@ -653,21 +653,46 @@
|
|
653
653
|
</div>
|
654
654
|
</div>
|
655
655
|
|
656
|
-
<div id="method-
|
657
|
-
<a name="
|
656
|
+
<div id="method-M000096" class="method-detail">
|
657
|
+
<a name="M000096"></a>
|
658
658
|
|
659
659
|
<div class="method-heading">
|
660
|
-
<a href="#
|
660
|
+
<a href="#M000096" class="method-signature">
|
661
661
|
<span class="method-name">pp_template_filename</span><span class="method-args">(basename)</span>
|
662
662
|
</a>
|
663
663
|
</div>
|
664
664
|
|
665
665
|
<div class="method-description">
|
666
666
|
<p><a class="source-toggle" href="#"
|
667
|
-
onclick="toggleCode('
|
668
|
-
<div class="method-source-code" id="
|
667
|
+
onclick="toggleCode('M000096-source');return false;">[Source]</a></p>
|
668
|
+
<div class="method-source-code" id="M000096-source">
|
669
669
|
<pre>
|
670
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
670
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 24</span>
|
671
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_template_filename</span>(<span class="ruby-identifier">basename</span>)
|
672
|
+
<span class="ruby-identifier">fname</span> = <span class="ruby-node">"#{RAILS_ROOT}/app/views/#{controller.controller_name}/#{basename}.html.erb"</span>
|
673
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">fname</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">test</span>(<span class="ruby-value">?f</span>, <span class="ruby-identifier">fname</span>)
|
674
|
+
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{RAILS_ROOT}/app/views/#{controller.controller_name}/#{basename}.rhtml"</span>
|
675
|
+
<span class="ruby-keyword kw">end</span>
|
676
|
+
</pre>
|
677
|
+
</div>
|
678
|
+
</div>
|
679
|
+
</div>
|
680
|
+
|
681
|
+
<div id="method-M000095" class="method-detail">
|
682
|
+
<a name="M000095"></a>
|
683
|
+
|
684
|
+
<div class="method-heading">
|
685
|
+
<a href="#M000095" class="method-signature">
|
686
|
+
<span class="method-name">pp_template_filename</span><span class="method-args">(basename)</span>
|
687
|
+
</a>
|
688
|
+
</div>
|
689
|
+
|
690
|
+
<div class="method-description">
|
691
|
+
<p><a class="source-toggle" href="#"
|
692
|
+
onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
|
693
|
+
<div class="method-source-code" id="M000095-source">
|
694
|
+
<pre>
|
695
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 20</span>
|
671
696
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_template_filename</span>(<span class="ruby-identifier">basename</span>)
|
672
697
|
<span class="ruby-keyword kw">return</span> <span class="ruby-node">"#{RAILS_ROOT}/app/views/#{controller.controller_name}/#{basename}.rhtml"</span>
|
673
698
|
<span class="ruby-keyword kw">end</span>
|
@@ -676,21 +701,21 @@
|
|
676
701
|
</div>
|
677
702
|
</div>
|
678
703
|
|
679
|
-
<div id="method-
|
680
|
-
<a name="
|
704
|
+
<div id="method-M000107" class="method-detail">
|
705
|
+
<a name="M000107"></a>
|
681
706
|
|
682
707
|
<div class="method-heading">
|
683
|
-
<a href="#
|
708
|
+
<a href="#M000107" class="method-signature">
|
684
709
|
<span class="method-name">pp_text_area</span><span class="method-args">(object_name, method, options={})</span>
|
685
710
|
</a>
|
686
711
|
</div>
|
687
712
|
|
688
713
|
<div class="method-description">
|
689
714
|
<p><a class="source-toggle" href="#"
|
690
|
-
onclick="toggleCode('
|
691
|
-
<div class="method-source-code" id="
|
715
|
+
onclick="toggleCode('M000107-source');return false;">[Source]</a></p>
|
716
|
+
<div class="method-source-code" id="M000107-source">
|
692
717
|
<pre>
|
693
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
718
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 96</span>
|
694
719
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_text_area</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
695
720
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:text_area</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
696
721
|
<span class="ruby-keyword kw">end</span>
|
@@ -699,21 +724,21 @@
|
|
699
724
|
</div>
|
700
725
|
</div>
|
701
726
|
|
702
|
-
<div id="method-
|
703
|
-
<a name="
|
727
|
+
<div id="method-M000103" class="method-detail">
|
728
|
+
<a name="M000103"></a>
|
704
729
|
|
705
730
|
<div class="method-heading">
|
706
|
-
<a href="#
|
731
|
+
<a href="#M000103" class="method-signature">
|
707
732
|
<span class="method-name">pp_text_field</span><span class="method-args">(object_name, method, options={})</span>
|
708
733
|
</a>
|
709
734
|
</div>
|
710
735
|
|
711
736
|
<div class="method-description">
|
712
737
|
<p><a class="source-toggle" href="#"
|
713
|
-
onclick="toggleCode('
|
714
|
-
<div class="method-source-code" id="
|
738
|
+
onclick="toggleCode('M000103-source');return false;">[Source]</a></p>
|
739
|
+
<div class="method-source-code" id="M000103-source">
|
715
740
|
<pre>
|
716
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
741
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 80</span>
|
717
742
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_text_field</span>(<span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>={})
|
718
743
|
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">pp_tag_helper</span>(<span class="ruby-identifier">:text_field</span>, <span class="ruby-identifier">object_name</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">options</span>)
|
719
744
|
<span class="ruby-keyword kw">end</span>
|
@@ -722,21 +747,21 @@
|
|
722
747
|
</div>
|
723
748
|
</div>
|
724
749
|
|
725
|
-
<div id="method-
|
726
|
-
<a name="
|
750
|
+
<div id="method-M000117" class="method-detail">
|
751
|
+
<a name="M000117"></a>
|
727
752
|
|
728
753
|
<div class="method-heading">
|
729
|
-
<a href="#
|
754
|
+
<a href="#M000117" class="method-signature">
|
730
755
|
<span class="method-name">pp_time_zone_select</span><span class="method-args">(object, method, priority_zones=nil, options={}, html_options={})</span>
|
731
756
|
</a>
|
732
757
|
</div>
|
733
758
|
|
734
759
|
<div class="method-description">
|
735
760
|
<p><a class="source-toggle" href="#"
|
736
|
-
onclick="toggleCode('
|
737
|
-
<div class="method-source-code" id="
|
761
|
+
onclick="toggleCode('M000117-source');return false;">[Source]</a></p>
|
762
|
+
<div class="method-source-code" id="M000117-source">
|
738
763
|
<pre>
|
739
|
-
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line
|
764
|
+
<span class="ruby-comment cmt"># File erubis/helpers/rails_form_helper.rb, line 184</span>
|
740
765
|
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pp_time_zone_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">priority_zones</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>={}, <span class="ruby-identifier">html_options</span>={})
|
741
766
|
<span class="ruby-identifier">model</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:model</span>] <span class="ruby-operator">||</span> <span class="ruby-identifier">options</span>[<span class="ruby-value str">'model'</span>] <span class="ruby-operator">||</span> <span class="ruby-constant">TimeZone</span>
|
742
767
|
<span class="ruby-identifier">collection</span> = <span class="ruby-identifier">model</span>.<span class="ruby-identifier">all</span>.<span class="ruby-identifier">collect</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">e</span><span class="ruby-operator">|</span> [<span class="ruby-identifier">e</span>.<span class="ruby-identifier">name</span>, <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>] }
|