state_select_plugin 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,229 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: ActionView::Helpers::FormOptionsHelper</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">ActionView::Helpers::FormOptionsHelper</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/state_select_rb.html">
59
+ lib/state_select.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000002">state_options_for_select</a>&nbsp;&nbsp;
84
+ <a href="#M000001">state_select</a>&nbsp;&nbsp;
85
+ </div>
86
+ </div>
87
+
88
+ </div>
89
+
90
+
91
+ <!-- if includes -->
92
+
93
+ <div id="section">
94
+
95
+
96
+ <div id="constants-list">
97
+ <h3 class="section-bar">Constants</h3>
98
+
99
+ <div class="name-list">
100
+ <table summary="Constants">
101
+ <tr class="top-aligned-row context-row">
102
+ <td class="context-item-name">US_STATES</td>
103
+ <td>=</td>
104
+ <td class="context-item-value">[&quot;Alabama&quot;, &quot;Alaska&quot;, &quot;Arizona&quot;, &quot;Arkansas&quot;, &quot;California&quot;, &quot;Colorado&quot;, &quot;Connecticut&quot;, &quot;Delaware&quot;, &quot;Florida&quot;, &quot;Georgia&quot;, &quot;Hawaii&quot;, &quot;Idaho&quot;, &quot;Illinois&quot;, &quot;Indiana&quot;, &quot;Iowa&quot;, &quot;Kansas&quot;, &quot;Kentucky&quot;, &quot;Louisiana&quot;, &quot;Maine&quot;, &quot;Maryland&quot;, &quot;Massachusetts&quot;, &quot;Michigan&quot;, &quot;Minnesota&quot;, &quot;Mississippi&quot;, &quot;Missouri&quot;, &quot;Montana&quot;, &quot;Nebraska&quot;, &quot;Nevada&quot;, &quot;New Hampshire&quot;, &quot;New Jersey&quot;, &quot;New Mexico&quot;, &quot;New York&quot;, &quot;North Carolina&quot;, &quot;North Dakota&quot;, &quot;Ohio&quot;, &quot;Oklahoma&quot;, &quot;Oregon&quot;, &quot;Pennsylvania&quot;, &quot;Puerto Rico&quot;, &quot;Rhode Island&quot;, &quot;South Carolina&quot;, &quot;South Dakota&quot;, &quot;Tennessee&quot;, &quot;Texas&quot;, &quot;Utah&quot;, &quot;Vermont&quot;, &quot;Virginia&quot;, &quot;Washington&quot;, &quot;Washington D.C.&quot;, &quot;West Virginia&quot;, &quot;Wisconsin&quot;, &quot;Wyoming&quot;] unless const_defined?(&quot;US_STATES&quot;)</td>
105
+ </tr>
106
+ <tr class="top-aligned-row context-row">
107
+ <td class="context-item-name">INDIA_STATES</td>
108
+ <td>=</td>
109
+ <td class="context-item-value">[&quot;Andhra Pradesh&quot;, &quot;Arunachal Pradesh&quot;, &quot;Assam&quot;, &quot;Bihar&quot;, &quot;Chhattisgarh&quot;, &quot;New Delhi&quot;, &quot;Goa&quot;, &quot;Gujarat&quot;, &quot;Haryana&quot;, &quot;Himachal Pradesh&quot;, &quot;Jammu and Kashmir&quot;, &quot;Jharkhand&quot;, &quot;Karnataka&quot;, &quot;Kerala&quot;, &quot;Madhya Pradesh&quot;, &quot;Maharashtra&quot;, &quot;Manipur&quot;, &quot;Meghalaya&quot;, &quot;Mizoram&quot;, &quot;Nagaland&quot;, &quot;Orissa&quot;&quot;Punjab&quot;, &quot;Rajasthan&quot;, &quot;Sikkim&quot;, &quot;Tamil Nadu&quot;, &quot;Tripura&quot;, &quot;Uttaranchal&quot;, &quot;Uttar Pradesh&quot;, &quot;West Bengal&quot;] unless const_defined?(&quot;INDIA_STATES&quot;)</td>
110
+ </tr>
111
+ <tr class="top-aligned-row context-row">
112
+ <td class="context-item-name">CANADA_STATES</td>
113
+ <td>=</td>
114
+ <td class="context-item-value">[&quot;Alberta&quot;, &quot;British Columbia&quot;, &quot;Manitoba&quot;, &quot;New Brunswick&quot;, &quot;Newfoundland&quot;, &quot;Northwest Territories&quot;, &quot;Nova Scotia&quot;, &quot;Nunavut&quot;, &quot;Ontario&quot;, &quot;Prince Edward Island&quot;, &quot;Quebec&quot;, &quot;Saskatchewan&quot;, &quot;Yukon&quot;] unless const_defined?(&quot;CANADA_STATES&quot;)</td>
115
+ </tr>
116
+ <tr class="top-aligned-row context-row">
117
+ <td class="context-item-name">AUSTRALIA_STATES</td>
118
+ <td>=</td>
119
+ <td class="context-item-value">[&quot;Australian Capital Territory&quot;, &quot;New South Wales&quot;, &quot;Northern Territory&quot;, &quot;Queensland&quot;, &quot;South Australia&quot;, &quot;Tasmania&quot;, &quot;Victoria&quot;, &quot;Western Australia&quot;] unless const_defined?(&quot;AUSTRALIA_STATES&quot;)</td>
120
+ </tr>
121
+ <tr class="top-aligned-row context-row">
122
+ <td class="context-item-name">SPAIN_STATES</td>
123
+ <td>=</td>
124
+ <td class="context-item-value">[ &quot;Alava&quot;, &quot;Albacete&quot;, &quot;Alicante&quot;, &quot;Almeria&quot;, &quot;Asturias&quot;, &quot;Avila&quot;, &quot;Badajoz&quot;, &quot;Barcelona&quot;, &quot;Burgos&quot;, &quot;Caceres&quot;, &quot;Cadiz&quot;, &quot;Cantrabria&quot;, &quot;Castellon&quot;, &quot;Ceuta&quot;, &quot;Ciudad Real&quot;, &quot;Cordoba&quot;, &quot;Cuenca&quot;, &quot;Girona&quot;, &quot;Granada&quot;, &quot;Guadalajara&quot;, &quot;Guipuzcoa&quot;, &quot;Huelva&quot;, &quot;Huesca&quot;, &quot;Islas Baleares&quot;, &quot;Jaen&quot;, &quot;La Coruna&quot;,&quot;Leon&quot;, &quot;Lleida&quot;, &quot;Lugo&quot;, &quot;Madrid&quot;, &quot;Malaga&quot;, &quot;Melilla&quot;, &quot;Murcia&quot;, &quot;Navarra&quot;, &quot;Ourense&quot;, &quot;Palencia&quot;, &quot;Palmas, Las&quot;, &quot;Pontevedra&quot;, &quot;Rioja, La&quot;, &quot;Salamanda&quot;, &quot;Santa Cruz de Tenerife&quot;, &quot;Segovia&quot;, &quot;Sevila&quot;, &quot;Soria&quot;, &quot;Tarragona&quot;, &quot;Teruel&quot;, &quot;Toledo&quot;, &quot;Valencia&quot;, &quot;Valladolid&quot;, &quot;Vizcaya&quot;, &quot;Zamora&quot;, &quot;Zaragoza&quot;] unless const_defined?(&quot;SPAIN_STATES&quot;)</td>
125
+ </tr>
126
+ <tr class="top-aligned-row context-row">
127
+ <td class="context-item-name">UGANDA_STATES</td>
128
+ <td>=</td>
129
+ <td class="context-item-value">[&quot;Abim&quot;, &quot;Adjumani&quot;, &quot;Amolatar&quot;, &quot;Amuria&quot;, &quot;Apac&quot;, &quot;Arua&quot;, &quot;Budaka&quot;, &quot;Bugiri&quot;, &quot;Bukwa&quot;, &quot;Bulisa&quot;, &quot;Bundibugyo&quot;, &quot;Bushenyi&quot;, &quot;Busia&quot;, &quot;Busiki&quot;, &quot;Butaleja&quot;, &quot;Dokolo&quot;, &quot;Gulu&quot;, &quot;Hoima&quot;, &quot;Ibanda&quot;, &quot;Iganga&quot;, &quot;Jinja&quot;, &quot;Kaabong&quot;, &quot;Kabale&quot;, &quot;Kabarole&quot;, &quot;Kaberamaido&quot;, &quot;Kabingo&quot;, &quot;Kalangala&quot;, &quot;Kaliro&quot;, &quot;Kampala&quot;, &quot;Kamuli&quot;, &quot;Kamwenge&quot;, &quot;Kanungu&quot;, &quot;Kapchorwa&quot;, &quot;Kasese&quot;, &quot;Katakwi&quot;, &quot;Kayunga&quot;, &quot;Kibale&quot;, &quot;Kiboga&quot;, &quot;Kilak&quot;, &quot;Kiruhura&quot;, &quot;Kisoro&quot;, &quot;Kitgum&quot;, &quot;Koboko&quot;, &quot;Kotido&quot;, &quot;Kumi&quot;, &quot;Kyenjojo&quot;, &quot;Lira&quot;, &quot;Luwero&quot;, &quot;Manafwa&quot;, &quot;Maracha&quot;, &quot;Masaka&quot;, &quot;Masindi&quot;, &quot;Mayuge&quot;, &quot;Mbale&quot;, &quot;Mbarara&quot;, &quot;Mityana&quot;, &quot;Moroto&quot;, &quot;Moyo&quot;, &quot;Mpigi&quot;, &quot;Mubende&quot;, &quot;Mukono&quot;, &quot;Nakapiripirit&quot;, &quot;Nakaseke&quot;, &quot;Nakasongola&quot;, &quot;Nebbi&quot;, &quot;Ntungamo&quot;, &quot;Oyam&quot;, &quot;Pader&quot;, &quot;Pallisa&quot;, &quot;Rakai&quot;, &quot;Rukungiri&quot;, &quot;Sembabule&quot;, &quot;Sironko&quot;, &quot;Soroti&quot;, &quot;Tororo&quot;, &quot;Wakiso&quot;, &quot;Yumbe&quot;] unless const_defined?(&quot;UGANDA_STATES&quot;)</td>
130
+ </tr>
131
+ <tr class="top-aligned-row context-row">
132
+ <td class="context-item-name">FRANCE_STATES</td>
133
+ <td>=</td>
134
+ <td class="context-item-value">[&quot;Alsace&quot;,&quot;Aquitaine&quot;,&quot;Auvergne&quot;,&quot;Bourgogne&quot;,&quot;Bretagne&quot;,&quot;Centre&quot;,&quot;Champagne-Ardenne&quot;,&quot;Corse&quot;,&quot;Franche-Comte&quot;,&quot;Ile-de-France&quot;,&quot;Languedoc-Roussillon&quot;,&quot;Limousin&quot;,&quot;Lorraine&quot;,&quot;Midi-Pyrenees&quot;,&quot;Nord-Pas-de-Calais&quot;,&quot;Basse-Normandie&quot;,&quot;Haute-Normandie&quot;,&quot;Pays de la Loire&quot;,&quot;Picardie&quot;,&quot;Poitou-Charentes&quot;,&quot;Provence-Alpes-Cote d'Azur&quot;,&quot;Rhone-Alpes&quot;] unless const_defined?(&quot;FRENCE_STATES&quot;)</td>
135
+ </tr>
136
+ <tr class="top-aligned-row context-row">
137
+ <td class="context-item-name">GERMAN_STATES</td>
138
+ <td>=</td>
139
+ <td class="context-item-value">[&quot;Baden-Wurttemberg&quot;, &quot;Bayern&quot;, &quot;Berlin&quot;, &quot;Brandenburg&quot;, &quot;Bremen&quot;, &quot;Hamburg&quot;, &quot;Hessen&quot;, &quot;Mecklenburg- Vorpommern&quot;, &quot;Niedersachsen&quot;, &quot;Nordrhein-Westfalen&quot;, &quot;Rhineland- Pflaz&quot;, &quot;Saarland&quot;, &quot;Sachsen&quot;, &quot;Sachsen-Anhalt&quot;, &quot;Schleswig- Holstein&quot;, &quot;Thuringen&quot;] unless const_defined?(&quot;GERMAN_STATES&quot;)</td>
140
+ </tr>
141
+ </table>
142
+ </div>
143
+ </div>
144
+
145
+
146
+
147
+
148
+
149
+
150
+ <!-- if method_list -->
151
+ <div id="methods">
152
+ <h3 class="section-bar">Public Instance methods</h3>
153
+
154
+ <div id="method-M000002" class="method-detail">
155
+ <a name="M000002"></a>
156
+
157
+ <div class="method-heading">
158
+ <a href="#M000002" class="method-signature">
159
+ <span class="method-name">state_options_for_select</span><span class="method-args">(selected = nil, country = 'US')</span>
160
+ </a>
161
+ </div>
162
+
163
+ <div class="method-description">
164
+ <p>
165
+ Returns a string of option tags for states in a country. Supply a state
166
+ name as <tt>selected</tt> to have it marked as the selected option tag.
167
+ </p>
168
+ <p>
169
+ NOTE: Only the option tags are returned, you have to wrap this call in a
170
+ regular HTML select tag.
171
+ </p>
172
+ <p><a class="source-toggle" href="#"
173
+ onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
174
+ <div class="method-source-code" id="M000002-source">
175
+ <pre>
176
+ <span class="ruby-comment cmt"># File lib/state_select.rb, line 13</span>
177
+ 13: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">state_options_for_select</span>(<span class="ruby-identifier">selected</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">country</span> = <span class="ruby-value str">'US'</span>)
178
+ 14: <span class="ruby-identifier">state_options</span> = <span class="ruby-value str">&quot;&quot;</span>
179
+ 15: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">country</span>
180
+ 16: <span class="ruby-identifier">state_options</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">options_for_select</span>(<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">country</span>.<span class="ruby-identifier">upcase</span><span class="ruby-operator">+</span><span class="ruby-value str">'_STATES'</span>), <span class="ruby-identifier">selected</span>)
181
+ 17: <span class="ruby-keyword kw">end</span>
182
+ 18: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">state_options</span>
183
+ 19: <span class="ruby-keyword kw">end</span>
184
+ </pre>
185
+ </div>
186
+ </div>
187
+ </div>
188
+
189
+ <div id="method-M000001" class="method-detail">
190
+ <a name="M000001"></a>
191
+
192
+ <div class="method-heading">
193
+ <a href="#M000001" class="method-signature">
194
+ <span class="method-name">state_select</span><span class="method-args">(object, method, country='US', options = {}, html_options = {})</span>
195
+ </a>
196
+ </div>
197
+
198
+ <div class="method-description">
199
+ <p>
200
+ Return select and option tags for the given object and method, using <a
201
+ href="FormOptionsHelper.html#M000002">state_options_for_select</a> to
202
+ generate the list of option tags.
203
+ </p>
204
+ <p><a class="source-toggle" href="#"
205
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
206
+ <div class="method-source-code" id="M000001-source">
207
+ <pre>
208
+ <span class="ruby-comment cmt"># File lib/state_select.rb, line 4</span>
209
+ 4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">state_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">country</span>=<span class="ruby-value str">'US'</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
210
+ 5: <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-identifier">new</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:object</span>)).<span class="ruby-identifier">to_state_select_tag</span>(<span class="ruby-identifier">country</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
211
+ 6: <span class="ruby-keyword kw">end</span>
212
+ </pre>
213
+ </div>
214
+ </div>
215
+ </div>
216
+
217
+
218
+ </div>
219
+
220
+
221
+ </div>
222
+
223
+
224
+ <div id="validator-badges">
225
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
226
+ </div>
227
+
228
+ </body>
229
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>state_select (ActionView::Helpers::FormOptionsHelper)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/state_select.rb, line 4</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">state_select</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-identifier">country</span>=<span class="ruby-value str">'US'</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-identifier">html_options</span> = {})
15
+ <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-identifier">new</span>(<span class="ruby-identifier">object</span>, <span class="ruby-identifier">method</span>, <span class="ruby-keyword kw">self</span>, <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:object</span>)).<span class="ruby-identifier">to_state_select_tag</span>(<span class="ruby-identifier">country</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>state_options_for_select (ActionView::Helpers::FormOptionsHelper)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/state_select.rb, line 13</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">state_options_for_select</span>(<span class="ruby-identifier">selected</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-identifier">country</span> = <span class="ruby-value str">'US'</span>)
15
+ <span class="ruby-identifier">state_options</span> = <span class="ruby-value str">&quot;&quot;</span>
16
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">country</span>
17
+ <span class="ruby-identifier">state_options</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">options_for_select</span>(<span class="ruby-identifier">eval</span>(<span class="ruby-identifier">country</span><span class="ruby-operator">+</span><span class="ruby-value str">'_STATES'</span>), <span class="ruby-identifier">selected</span>)
18
+ <span class="ruby-keyword kw">end</span>
19
+ <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">state_options</span>
20
+ <span class="ruby-keyword kw">end</span></pre>
21
+ </body>
22
+ </html>
@@ -0,0 +1,150 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Class: ActionView::Helpers::InstanceTag</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Class</strong></td>
53
+ <td class="class-name-in-header">ActionView::Helpers::InstanceTag</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/state_select_rb.html">
59
+ lib/state_select.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ <tr class="top-aligned-row">
66
+ <td><strong>Parent:</strong></td>
67
+ <td>
68
+ Object
69
+ </td>
70
+ </tr>
71
+ </table>
72
+ </div>
73
+ <!-- banner header -->
74
+
75
+ <div id="bodyContent">
76
+
77
+
78
+
79
+ <div id="contextContent">
80
+
81
+
82
+
83
+ </div>
84
+
85
+ <div id="method-list">
86
+ <h3 class="section-bar">Methods</h3>
87
+
88
+ <div class="name-list">
89
+ <a href="#M000004">to_state_select_tag</a>&nbsp;&nbsp;
90
+ </div>
91
+ </div>
92
+
93
+ </div>
94
+
95
+
96
+ <!-- if includes -->
97
+
98
+ <div id="section">
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ <!-- if method_list -->
108
+ <div id="methods">
109
+ <h3 class="section-bar">Public Instance methods</h3>
110
+
111
+ <div id="method-M000004" class="method-detail">
112
+ <a name="M000004"></a>
113
+
114
+ <div class="method-heading">
115
+ <a href="#M000004" class="method-signature">
116
+ <span class="method-name">to_state_select_tag</span><span class="method-args">(country, options, html_options)</span>
117
+ </a>
118
+ </div>
119
+
120
+ <div class="method-description">
121
+ <p><a class="source-toggle" href="#"
122
+ onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000004-source">
124
+ <pre>
125
+ <span class="ruby-comment cmt"># File lib/state_select.rb, line 36</span>
126
+ 36: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_state_select_tag</span>(<span class="ruby-identifier">country</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
127
+ 37: <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">stringify_keys</span>
128
+ 38: <span class="ruby-identifier">add_default_name_and_id</span>(<span class="ruby-identifier">html_options</span>)
129
+ 39: <span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>
130
+ 40: <span class="ruby-identifier">selected_value</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:selected</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:selected</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">value</span>
131
+ 41: <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">&quot;select&quot;</span>, <span class="ruby-identifier">add_options</span>(<span class="ruby-identifier">state_options_for_select</span>(<span class="ruby-identifier">selected_value</span>, <span class="ruby-identifier">country</span>), <span class="ruby-identifier">options</span>, <span class="ruby-identifier">value</span>), <span class="ruby-identifier">html_options</span>)
132
+ 42: <span class="ruby-keyword kw">end</span>
133
+ </pre>
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+
139
+ </div>
140
+
141
+
142
+ </div>
143
+
144
+
145
+ <div id="validator-badges">
146
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
147
+ </div>
148
+
149
+ </body>
150
+ </html>
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>to_state_select_tag (ActionView::Helpers::InstanceTag)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../../../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File lib/state_select.rb, line 32</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_state_select_tag</span>(<span class="ruby-identifier">country</span>, <span class="ruby-identifier">options</span>, <span class="ruby-identifier">html_options</span>)
15
+ <span class="ruby-identifier">html_options</span> = <span class="ruby-identifier">html_options</span>.<span class="ruby-identifier">stringify_keys</span>
16
+ <span class="ruby-identifier">add_default_name_and_id</span>(<span class="ruby-identifier">html_options</span>)
17
+ <span class="ruby-identifier">selected_value</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">:selected</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:selected</span>] <span class="ruby-operator">:</span> <span class="ruby-identifier">value</span>
18
+ <span class="ruby-identifier">content_tag</span>(<span class="ruby-value str">&quot;select&quot;</span>, <span class="ruby-identifier">add_options</span>(<span class="ruby-identifier">state_options_for_select</span>(<span class="ruby-identifier">selected_value</span>, <span class="ruby-identifier">country</span>), <span class="ruby-identifier">options</span>, <span class="ruby-identifier">value</span>), <span class="ruby-identifier">html_options</span>)
19
+ <span class="ruby-keyword kw">end</span></pre>
20
+ </body>
21
+ </html>
@@ -0,0 +1 @@
1
+ Fri Feb 09 16:24:28 India Standard Time 2007
@@ -0,0 +1,14 @@
1
+ digraph TopLevel {
2
+ compound = true
3
+ bgcolor = lightcyan1
4
+ fontname = Arial
5
+ fontsize = 8
6
+ label = "test/state_select_test.rb"
7
+ node [
8
+ fontname = Arial,
9
+ fontsize = 8,
10
+ color = black
11
+ ]
12
+
13
+ }
14
+