anchormodel 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +6 -6
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/anchormodel.gemspec +5 -5
- data/doc/Anchormodel/ActiveModelTypeValueMulti.html +3 -3
- data/doc/Anchormodel/ActiveModelTypeValueSingle.html +3 -3
- data/doc/Anchormodel/Attribute.html +3 -3
- data/doc/Anchormodel/ModelMixin.html +164 -3
- data/doc/Anchormodel/SimpleFormInputs/Helpers/AnchormodelInputsCommon.html +21 -9
- data/doc/Anchormodel/SimpleFormInputs/Helpers.html +3 -3
- data/doc/Anchormodel/SimpleFormInputs.html +3 -3
- data/doc/Anchormodel/Util.html +3 -3
- data/doc/Anchormodel/Version.html +3 -3
- data/doc/Anchormodel.html +3 -3
- data/doc/AnchormodelCheckBoxesInput.html +3 -3
- data/doc/AnchormodelGenerator.html +3 -3
- data/doc/AnchormodelInput.html +3 -3
- data/doc/AnchormodelRadioButtonsInput.html +3 -3
- data/doc/_index.html +4 -4
- data/doc/class_list.html +6 -3
- data/doc/css/full_list.css +3 -3
- data/doc/css/style.css +6 -0
- data/doc/file.README.html +3 -3
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +3 -3
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +21 -2
- data/doc/top-level-namespace.html +3 -3
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0879b0ba5bb815a7ac9c2f8f79767fe5fa4e8e16451398e721f90ad76f74c722'
|
4
|
+
data.tar.gz: b8291cd902aec98f1e8e66960d3f5bb8b7087dcaedcd37e2779ec5bbf1168466
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ab29238cbfc8eb19660cd264882bbb8d2dd8a2990e8269bca937488319e893e8d7e0be602b15082acb3d87a4bd85e208831c1ef3a3761791e0c2f0cda782abe7
|
7
|
+
data.tar.gz: e3c2dcd50fabbc3227c6dd6e35e98e26d8165815fd329b4b460641d825ad98b774f9392949ca8ed5654aeeebc6fea1103810eceb7172bd6839489de70e8adbc0
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
anchormodel (0.2.
|
4
|
+
anchormodel (0.2.3.edge)
|
5
5
|
rails (~> 7.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -79,7 +79,7 @@ GEM
|
|
79
79
|
concurrent-ruby (1.1.10)
|
80
80
|
crass (1.0.6)
|
81
81
|
date (3.3.4)
|
82
|
-
erubi (1.
|
82
|
+
erubi (1.13.0)
|
83
83
|
globalid (1.2.1)
|
84
84
|
activesupport (>= 6.1)
|
85
85
|
i18n (1.12.0)
|
@@ -102,7 +102,7 @@ GEM
|
|
102
102
|
builder
|
103
103
|
minitest (>= 5.0)
|
104
104
|
ruby-progressbar
|
105
|
-
net-imap (0.4.
|
105
|
+
net-imap (0.4.14)
|
106
106
|
date
|
107
107
|
net-protocol
|
108
108
|
net-pop (0.1.2)
|
@@ -112,7 +112,7 @@ GEM
|
|
112
112
|
net-smtp (0.5.0)
|
113
113
|
net-protocol
|
114
114
|
nio4r (2.7.3)
|
115
|
-
nokogiri (1.16.
|
115
|
+
nokogiri (1.16.7-x86_64-linux)
|
116
116
|
racc (~> 1.4)
|
117
117
|
parallel (1.22.1)
|
118
118
|
parser (3.2.0.0)
|
@@ -120,7 +120,7 @@ GEM
|
|
120
120
|
pry (0.14.1)
|
121
121
|
coderay (~> 1.1)
|
122
122
|
method_source (~> 1.0)
|
123
|
-
racc (1.8.
|
123
|
+
racc (1.8.1)
|
124
124
|
rack (2.2.5)
|
125
125
|
rack-test (2.1.0)
|
126
126
|
rack (>= 1.3)
|
@@ -187,7 +187,7 @@ GEM
|
|
187
187
|
webrick (~> 1.7.0)
|
188
188
|
yard-activesupport-concern (0.0.1)
|
189
189
|
yard (>= 0.8)
|
190
|
-
zeitwerk (2.6.
|
190
|
+
zeitwerk (2.6.17)
|
191
191
|
|
192
192
|
PLATFORMS
|
193
193
|
x86_64-linux
|
data/Rakefile
CHANGED
@@ -16,7 +16,7 @@ task :gemspec do
|
|
16
16
|
s.homepage = 'https://github.com/kalsan/anchormodel'
|
17
17
|
|
18
18
|
# Dependencies
|
19
|
-
s.add_runtime_dependency 'rails', '
|
19
|
+
s.add_runtime_dependency 'rails', '>= 7.0'
|
20
20
|
|
21
21
|
s.add_development_dependency 'rake', '~> 13.0.6'
|
22
22
|
s.add_development_dependency 'pry', '~> 0.14.1'
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/anchormodel.gemspec
CHANGED
@@ -2,26 +2,26 @@
|
|
2
2
|
# This file is auto-generated via: 'rake gemspec'.
|
3
3
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: anchormodel 0.2.
|
5
|
+
# stub: anchormodel 0.2.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "anchormodel".freeze
|
9
|
-
s.version = "0.2.
|
9
|
+
s.version = "0.2.3".freeze
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Sandro Kalbermatter".freeze]
|
14
|
-
s.date = "2024-
|
14
|
+
s.date = "2024-11-01"
|
15
15
|
s.files = [".gitignore".freeze, ".ruby-version".freeze, ".yardopts".freeze, "CHANGELOG.md".freeze, "Gemfile".freeze, "Gemfile.lock".freeze, "LICENSE".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "anchormodel.gemspec".freeze, "bin/rails".freeze, "doc/Anchormodel.html".freeze, "doc/Anchormodel/ActiveModelTypeValue.html".freeze, "doc/Anchormodel/ActiveModelTypeValueMulti.html".freeze, "doc/Anchormodel/ActiveModelTypeValueSingle.html".freeze, "doc/Anchormodel/Attribute.html".freeze, "doc/Anchormodel/ModelMixin.html".freeze, "doc/Anchormodel/SimpleFormInputs.html".freeze, "doc/Anchormodel/SimpleFormInputs/Helpers.html".freeze, "doc/Anchormodel/SimpleFormInputs/Helpers/AnchormodelInputsCommon.html".freeze, "doc/Anchormodel/Util.html".freeze, "doc/Anchormodel/Version.html".freeze, "doc/AnchormodelCheckBoxesInput.html".freeze, "doc/AnchormodelGenerator.html".freeze, "doc/AnchormodelInput.html".freeze, "doc/AnchormodelRadioButtonsInput.html".freeze, "doc/_index.html".freeze, "doc/class_list.html".freeze, "doc/css/common.css".freeze, "doc/css/full_list.css".freeze, "doc/css/style.css".freeze, "doc/file.README.html".freeze, "doc/file_list.html".freeze, "doc/frames.html".freeze, "doc/index.html".freeze, "doc/js/app.js".freeze, "doc/js/full_list.js".freeze, "doc/js/jquery.js".freeze, "doc/method_list.html".freeze, "doc/top-level-namespace.html".freeze, "lib/anchormodel.rb".freeze, "lib/anchormodel/active_model_type_value_multi.rb".freeze, "lib/anchormodel/active_model_type_value_single.rb".freeze, "lib/anchormodel/attribute.rb".freeze, "lib/anchormodel/model_mixin.rb".freeze, "lib/anchormodel/simple_form_inputs/anchormodel_check_boxes_input.rb".freeze, "lib/anchormodel/simple_form_inputs/anchormodel_input.rb".freeze, "lib/anchormodel/simple_form_inputs/anchormodel_radio_buttons_input.rb".freeze, "lib/anchormodel/simple_form_inputs/helpers/anchormodel_inputs_common.rb".freeze, "lib/anchormodel/util.rb".freeze, "lib/anchormodel/version.rb".freeze, "lib/generators/anchormodel/USAGE".freeze, "lib/generators/anchormodel/anchormodel_generator.rb".freeze, "lib/generators/anchormodel/templates/anchormodel.rb.erb".freeze, "logo.svg".freeze, "test/active_record_model/user_test.rb".freeze, "test/dummy/.gitignore".freeze, "test/dummy/Rakefile".freeze, "test/dummy/app/anchormodels/animal.rb".freeze, "test/dummy/app/anchormodels/locale.rb".freeze, "test/dummy/app/anchormodels/role.rb".freeze, "test/dummy/app/helpers/application_helper.rb".freeze, "test/dummy/app/models/application_record.rb".freeze, "test/dummy/app/models/concerns/.keep".freeze, "test/dummy/app/models/user.rb".freeze, "test/dummy/bin/rails".freeze, "test/dummy/bin/rake".freeze, "test/dummy/bin/setup".freeze, "test/dummy/config.ru".freeze, "test/dummy/config/application.rb".freeze, "test/dummy/config/boot.rb".freeze, "test/dummy/config/credentials.yml.enc".freeze, "test/dummy/config/database.yml".freeze, "test/dummy/config/environment.rb".freeze, "test/dummy/config/environments/test.rb".freeze, "test/dummy/config/initializers/content_security_policy.rb".freeze, "test/dummy/config/initializers/filter_parameter_logging.rb".freeze, "test/dummy/config/initializers/inflections.rb".freeze, "test/dummy/config/initializers/permissions_policy.rb".freeze, "test/dummy/config/locales/en.yml".freeze, "test/dummy/config/puma.rb".freeze, "test/dummy/config/routes.rb".freeze, "test/dummy/db/migrate/20230107173151_create_users.rb".freeze, "test/dummy/db/migrate/20240425182000_add_animals_to_users.rb".freeze, "test/dummy/db/schema.rb".freeze, "test/dummy/db/seeds.rb".freeze, "test/dummy/lib/tasks/.keep".freeze, "test/dummy/log/.keep".freeze, "test/dummy/tmp/.keep".freeze, "test/dummy/tmp/pids/.keep".freeze, "test/test_helper.rb".freeze]
|
16
16
|
s.homepage = "https://github.com/kalsan/anchormodel".freeze
|
17
17
|
s.licenses = ["LGPL-3.0-or-later".freeze]
|
18
18
|
s.required_ruby_version = Gem::Requirement.new(">= 3.0.0".freeze)
|
19
|
-
s.rubygems_version = "3.5.
|
19
|
+
s.rubygems_version = "3.5.22".freeze
|
20
20
|
s.summary = "Bringing object-oriented programming to Rails enums".freeze
|
21
21
|
|
22
22
|
s.specification_version = 4
|
23
23
|
|
24
|
-
s.add_runtime_dependency(%q<rails>.freeze, ["
|
24
|
+
s.add_runtime_dependency(%q<rails>.freeze, [">= 7.0".freeze])
|
25
25
|
s.add_development_dependency(%q<rake>.freeze, ["~> 13.0.6".freeze])
|
26
26
|
s.add_development_dependency(%q<pry>.freeze, ["~> 0.14.1".freeze])
|
27
27
|
s.add_development_dependency(%q<rubocop>.freeze, ["~> 1.43.0".freeze])
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Anchormodel::ActiveModelTypeValueMulti
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -400,9 +400,9 @@
|
|
400
400
|
</div>
|
401
401
|
|
402
402
|
<div id="footer">
|
403
|
-
Generated on
|
403
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
404
404
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
405
|
-
0.9.
|
405
|
+
0.9.37 (ruby-3.3.5).
|
406
406
|
</div>
|
407
407
|
|
408
408
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Anchormodel::ActiveModelTypeValueSingle
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -687,9 +687,9 @@
|
|
687
687
|
</div>
|
688
688
|
|
689
689
|
<div id="footer">
|
690
|
-
Generated on
|
690
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
691
691
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
692
|
-
0.9.
|
692
|
+
0.9.37 (ruby-3.3.5).
|
693
693
|
</div>
|
694
694
|
|
695
695
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Anchormodel::Attribute
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -596,9 +596,9 @@
|
|
596
596
|
</div>
|
597
597
|
|
598
598
|
<div id="footer">
|
599
|
-
Generated on
|
599
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
600
600
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
601
|
-
0.9.
|
601
|
+
0.9.37 (ruby-3.3.5).
|
602
602
|
</div>
|
603
603
|
|
604
604
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Anchormodel::ModelMixin
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -106,15 +106,176 @@
|
|
106
106
|
|
107
107
|
|
108
108
|
|
109
|
+
|
110
|
+
<h2>
|
111
|
+
Class Method Summary
|
112
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
113
|
+
</h2>
|
114
|
+
|
115
|
+
<ul class="summary">
|
116
|
+
|
117
|
+
<li class="public ">
|
118
|
+
<span class="summary_signature">
|
119
|
+
|
120
|
+
<a href="#belongs_to_anchormodel-class_method" title="belongs_to_anchormodel (class method)">.<strong>belongs_to_anchormodel</strong>(*args, **kwargs) ⇒ Object </a>
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</span>
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
<span class="summary_desc"><div class='inline'>
|
135
|
+
<p>Creates an attribute linking to an Anchormodel.</p>
|
136
|
+
</div></span>
|
137
|
+
|
138
|
+
</li>
|
139
|
+
|
140
|
+
|
141
|
+
<li class="public ">
|
142
|
+
<span class="summary_signature">
|
143
|
+
|
144
|
+
<a href="#belongs_to_anchormodels-class_method" title="belongs_to_anchormodels (class method)">.<strong>belongs_to_anchormodels</strong>(*args, **kwargs) ⇒ Object </a>
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
</span>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
<span class="summary_desc"><div class='inline'>
|
159
|
+
<p>Creates an attribute linking to an array of Anchormodels.</p>
|
160
|
+
</div></span>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
|
165
|
+
</ul>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<div id="class_method_details" class="method_details_list">
|
172
|
+
<h2>Class Method Details</h2>
|
173
|
+
|
174
|
+
|
175
|
+
<div class="method_details first">
|
176
|
+
<h3 class="signature first" id="belongs_to_anchormodel-class_method">
|
177
|
+
|
178
|
+
.<strong>belongs_to_anchormodel</strong>(*args, **kwargs) ⇒ <tt>Object</tt>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
</h3><div class="docstring">
|
185
|
+
<div class="discussion">
|
186
|
+
|
187
|
+
<p>Creates an attribute linking to an Anchormodel. The attribute should be present in the DB and the column should be of type String and named the same as <code>attribute_name</code>.</p>
|
188
|
+
|
189
|
+
|
190
|
+
</div>
|
191
|
+
</div>
|
192
|
+
<div class="tags">
|
193
|
+
|
194
|
+
|
195
|
+
<p class="tag_title">See Also:</p>
|
196
|
+
<ul class="see">
|
197
|
+
|
198
|
+
<li>Parameters</li>
|
199
|
+
|
200
|
+
</ul>
|
201
|
+
|
202
|
+
</div><table class="source_code">
|
203
|
+
<tr>
|
204
|
+
<td>
|
205
|
+
<pre class="lines">
|
206
|
+
|
207
|
+
|
208
|
+
14
|
209
|
+
15
|
210
|
+
16</pre>
|
211
|
+
</td>
|
212
|
+
<td>
|
213
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel/model_mixin.rb', line 14</span>
|
214
|
+
|
215
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_belongs_to_anchormodel'>belongs_to_anchormodel</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
216
|
+
<span class='const'><span class='object_link'><a href="../Anchormodel.html" title="Anchormodel (class)">Anchormodel</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Util.html" title="Anchormodel::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_install_methods_in_model'><span class='object_link'><a href="Util.html#install_methods_in_model-class_method" title="Anchormodel::Util.install_methods_in_model (method)">install_methods_in_model</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
217
|
+
<span class='kw'>end</span></pre>
|
218
|
+
</td>
|
219
|
+
</tr>
|
220
|
+
</table>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
<div class="method_details ">
|
224
|
+
<h3 class="signature " id="belongs_to_anchormodels-class_method">
|
225
|
+
|
226
|
+
.<strong>belongs_to_anchormodels</strong>(*args, **kwargs) ⇒ <tt>Object</tt>
|
227
|
+
|
228
|
+
|
229
|
+
|
109
230
|
|
110
231
|
|
232
|
+
</h3><div class="docstring">
|
233
|
+
<div class="discussion">
|
234
|
+
|
235
|
+
<p>Creates an attribute linking to an array of Anchormodels. The attribute should be present in the DB and the column should be named the singular of <code>attribute_name</code>.</p>
|
236
|
+
|
237
|
+
|
238
|
+
</div>
|
239
|
+
</div>
|
240
|
+
<div class="tags">
|
241
|
+
|
242
|
+
|
243
|
+
<p class="tag_title">See Also:</p>
|
244
|
+
<ul class="see">
|
245
|
+
|
246
|
+
<li>Parameters</li>
|
247
|
+
|
248
|
+
</ul>
|
249
|
+
|
250
|
+
</div><table class="source_code">
|
251
|
+
<tr>
|
252
|
+
<td>
|
253
|
+
<pre class="lines">
|
254
|
+
|
255
|
+
|
256
|
+
21
|
257
|
+
22
|
258
|
+
23</pre>
|
259
|
+
</td>
|
260
|
+
<td>
|
261
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel/model_mixin.rb', line 21</span>
|
262
|
+
|
263
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_belongs_to_anchormodels'>belongs_to_anchormodels</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
264
|
+
<span class='const'><span class='object_link'><a href="../Anchormodel.html" title="Anchormodel (class)">Anchormodel</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Util.html" title="Anchormodel::Util (module)">Util</a></span></span><span class='period'>.</span><span class='id identifier rubyid_install_methods_in_model'><span class='object_link'><a href="Util.html#install_methods_in_model-class_method" title="Anchormodel::Util.install_methods_in_model (method)">install_methods_in_model</a></span></span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='comma'>,</span> <span class='label'>multiple:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
265
|
+
<span class='kw'>end</span></pre>
|
266
|
+
</td>
|
267
|
+
</tr>
|
268
|
+
</table>
|
269
|
+
</div>
|
270
|
+
|
271
|
+
</div>
|
111
272
|
|
112
273
|
</div>
|
113
274
|
|
114
275
|
<div id="footer">
|
115
|
-
Generated on
|
276
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
116
277
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
117
|
-
0.9.
|
278
|
+
0.9.37 (ruby-3.3.5).
|
118
279
|
</div>
|
119
280
|
|
120
281
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Anchormodel::SimpleFormInputs::Helpers::AnchormodelInputsCommon
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -204,18 +204,30 @@
|
|
204
204
|
39
|
205
205
|
40
|
206
206
|
41
|
207
|
-
42
|
207
|
+
42
|
208
|
+
43
|
209
|
+
44
|
210
|
+
45
|
211
|
+
46
|
212
|
+
47
|
213
|
+
48</pre>
|
208
214
|
</td>
|
209
215
|
<td>
|
210
216
|
<pre class="code"><span class="info file"># File 'lib/anchormodel/simple_form_inputs/helpers/anchormodel_inputs_common.rb', line 5</span>
|
211
217
|
|
212
218
|
<span class='kw'>def</span> <span class='id identifier rubyid_input'>input</span><span class='lparen'>(</span><span class='id identifier rubyid_wrapper_options'>wrapper_options</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
213
|
-
<span class='kw'>
|
214
|
-
<span class='id identifier
|
215
|
-
|
219
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span>
|
220
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:anchormodel_attributes</span><span class='rparen'>)</span>
|
221
|
+
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>The form field object does not appear to respond to `anchormodel_attributes`, \
|
222
|
+
did you `include Anchormodel::ModelMixin` in your `application_record.rb`? Affected object: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
223
|
+
<span class='kw'>end</span>
|
224
|
+
<span class='id identifier rubyid_am_attr'>am_attr</span> <span class='op'>=</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_anchormodel_attributes'>anchormodel_attributes</span><span class='lbracket'>[</span><span class='ivar'>@attribute_name</span><span class='rbracket'>]</span>
|
225
|
+
<span class='kw'>elsif</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_key?'>key?</span><span class='lparen'>(</span><span class='symbol'>:anchormodel_attribute</span><span class='rparen'>)</span>
|
226
|
+
<span class='id identifier rubyid_am_attr'>am_attr</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:anchormodel_attribute</span><span class='rparen'>)</span>
|
227
|
+
<span class='kw'>else</span>
|
228
|
+
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>:anchormodel input requires either an object or the input option :anchormodel_attribute, but neither is set.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
216
229
|
<span class='kw'>end</span>
|
217
230
|
|
218
|
-
<span class='id identifier rubyid_am_attr'>am_attr</span> <span class='op'>=</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_anchormodel_attributes'>anchormodel_attributes</span><span class='lbracket'>[</span><span class='ivar'>@attribute_name</span><span class='rbracket'>]</span>
|
219
231
|
<span class='kw'>unless</span> <span class='id identifier rubyid_am_attr'>am_attr</span>
|
220
232
|
<span class='id identifier rubyid_fail'>fail</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@attribute_name</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_content'> does not look like an Anchormodel attribute, is `belongs_to_anchormodel` called in your model? \
|
221
233
|
Affected object: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -224,7 +236,7 @@ Affected object: </span><span class='embexpr_beg'>#{</span><span class='id ident
|
|
224
236
|
<span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:multiple</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='kw'>if</span> <span class='id identifier rubyid_am_attr'>am_attr</span><span class='period'>.</span><span class='id identifier rubyid_multiple?'>multiple?</span> <span class='op'>&&</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:multiple</span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='kw'>false</span> <span class='comment'># allow overriding
|
225
237
|
</span>
|
226
238
|
<span class='comment'># Attempt to read selected key from html input options "value", as the caller might not know that this is a select.
|
227
|
-
</span> <span class='id identifier rubyid_selected_key'>selected_key</span> <span class='op'>=</span> <span class='id identifier rubyid_input_options'>input_options</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span>
|
239
|
+
</span> <span class='id identifier rubyid_selected_key'>selected_key</span> <span class='op'>=</span> <span class='id identifier rubyid_input_options'>input_options</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_presence'>presence</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_dig'>dig</span><span class='lparen'>(</span><span class='symbol'>:input_html</span><span class='comma'>,</span> <span class='symbol'>:value</span><span class='rparen'>)</span>
|
228
240
|
<span class='kw'>if</span> <span class='id identifier rubyid_selected_key'>selected_key</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='op'>&&</span> <span class='id identifier rubyid_object'>object</span>
|
229
241
|
<span class='comment'># No selected key override present and a model is present, use the model to find out what to select.
|
230
242
|
</span> <span class='id identifier rubyid_selected_am'>selected_am</span> <span class='op'>=</span> <span class='id identifier rubyid_object'>object</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='ivar'>@attribute_name</span><span class='rparen'>)</span>
|
@@ -257,9 +269,9 @@ Affected object: </span><span class='embexpr_beg'>#{</span><span class='id ident
|
|
257
269
|
</div>
|
258
270
|
|
259
271
|
<div id="footer">
|
260
|
-
Generated on
|
272
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
261
273
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
262
|
-
0.9.
|
274
|
+
0.9.37 (ruby-3.3.5).
|
263
275
|
</div>
|
264
276
|
|
265
277
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Anchormodel::SimpleFormInputs::Helpers
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -114,9 +114,9 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
-
0.9.
|
119
|
+
0.9.37 (ruby-3.3.5).
|
120
120
|
</div>
|
121
121
|
|
122
122
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Anchormodel::SimpleFormInputs
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -114,9 +114,9 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
|
-
0.9.
|
119
|
+
0.9.37 (ruby-3.3.5).
|
120
120
|
</div>
|
121
121
|
|
122
122
|
</div>
|
data/doc/Anchormodel/Util.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Anchormodel::Util
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -602,9 +602,9 @@
|
|
602
602
|
</div>
|
603
603
|
|
604
604
|
<div id="footer">
|
605
|
-
Generated on
|
605
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
606
606
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
607
|
-
0.9.
|
607
|
+
0.9.37 (ruby-3.3.5).
|
608
608
|
</div>
|
609
609
|
|
610
610
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Anchormodel::Version
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -129,9 +129,9 @@
|
|
129
129
|
</div>
|
130
130
|
|
131
131
|
<div id="footer">
|
132
|
-
Generated on
|
132
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
133
133
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
134
|
-
0.9.
|
134
|
+
0.9.37 (ruby-3.3.5).
|
135
135
|
</div>
|
136
136
|
|
137
137
|
</div>
|
data/doc/Anchormodel.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Anchormodel
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -999,9 +999,9 @@
|
|
999
999
|
</div>
|
1000
1000
|
|
1001
1001
|
<div id="footer">
|
1002
|
-
Generated on
|
1002
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
1003
1003
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1004
|
-
0.9.
|
1004
|
+
0.9.37 (ruby-3.3.5).
|
1005
1005
|
</div>
|
1006
1006
|
|
1007
1007
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: AnchormodelCheckBoxesInput
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -130,9 +130,9 @@
|
|
130
130
|
</div>
|
131
131
|
|
132
132
|
<div id="footer">
|
133
|
-
Generated on
|
133
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
134
134
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
135
|
-
0.9.
|
135
|
+
0.9.37 (ruby-3.3.5).
|
136
136
|
</div>
|
137
137
|
|
138
138
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: AnchormodelGenerator
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -191,9 +191,9 @@
|
|
191
191
|
</div>
|
192
192
|
|
193
193
|
<div id="footer">
|
194
|
-
Generated on
|
194
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
195
195
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
196
|
-
0.9.
|
196
|
+
0.9.37 (ruby-3.3.5).
|
197
197
|
</div>
|
198
198
|
|
199
199
|
</div>
|
data/doc/AnchormodelInput.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: AnchormodelInput
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -130,9 +130,9 @@
|
|
130
130
|
</div>
|
131
131
|
|
132
132
|
<div id="footer">
|
133
|
-
Generated on
|
133
|
+
Generated on Fri Nov 1 12:02:06 2024 by
|
134
134
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
135
|
-
0.9.
|
135
|
+
0.9.37 (ruby-3.3.5).
|
136
136
|
</div>
|
137
137
|
|
138
138
|
</div>
|