anchormodel 0.2.3 → 0.2.4
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/VERSION +1 -1
- data/anchormodel.gemspec +3 -3
- data/doc/Anchormodel/ActiveModelTypeValueMulti.html +1 -1
- data/doc/Anchormodel/ActiveModelTypeValueSingle.html +1 -1
- data/doc/Anchormodel/Attribute.html +1 -1
- data/doc/Anchormodel/ModelMixin.html +1 -1
- data/doc/Anchormodel/SimpleFormInputs/Helpers/AnchormodelInputsCommon.html +1 -1
- data/doc/Anchormodel/SimpleFormInputs/Helpers.html +1 -1
- data/doc/Anchormodel/SimpleFormInputs.html +1 -1
- data/doc/Anchormodel/Util.html +1 -1
- data/doc/Anchormodel/Version.html +1 -1
- data/doc/Anchormodel.html +97 -32
- data/doc/AnchormodelCheckBoxesInput.html +1 -1
- data/doc/AnchormodelGenerator.html +1 -1
- data/doc/AnchormodelInput.html +1 -1
- data/doc/AnchormodelRadioButtonsInput.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +26 -18
- data/doc/top-level-namespace.html +1 -1
- data/lib/anchormodel.rb +5 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07bc0ce1f755bae4c92dfd6fa7c80e33b60ed348482ea8c25a6a1a65b10d8ef0
|
4
|
+
data.tar.gz: ea624e7f77d9b04bb2affdb86683e5f50cd102357a7a6d8ad3a6d82dfb00c4ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b39a0f238bc979f960a81bf9ff117c7be02e74a7bf942e075cd29586120c53f2d8158753db132733b3cb6099faad94e7a076079613711404a7fd69c3a1b1ef9
|
7
|
+
data.tar.gz: 31e6137480ca09a3d2eb0624c70e43f02494a4c2e7b2ecc4c671f032304d6956d75c8fc53959564447362230ef57ab3519ff741fa27b65377e50982657dcfaa6
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.4
|
data/anchormodel.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
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.4 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.4".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-11-
|
14
|
+
s.date = "2024-11-06"
|
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]
|
@@ -400,7 +400,7 @@
|
|
400
400
|
</div>
|
401
401
|
|
402
402
|
<div id="footer">
|
403
|
-
Generated on
|
403
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
404
404
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
405
405
|
0.9.37 (ruby-3.3.5).
|
406
406
|
</div>
|
@@ -687,7 +687,7 @@
|
|
687
687
|
</div>
|
688
688
|
|
689
689
|
<div id="footer">
|
690
|
-
Generated on
|
690
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
691
691
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
692
692
|
0.9.37 (ruby-3.3.5).
|
693
693
|
</div>
|
@@ -596,7 +596,7 @@
|
|
596
596
|
</div>
|
597
597
|
|
598
598
|
<div id="footer">
|
599
|
-
Generated on
|
599
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
600
600
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
601
601
|
0.9.37 (ruby-3.3.5).
|
602
602
|
</div>
|
@@ -273,7 +273,7 @@
|
|
273
273
|
</div>
|
274
274
|
|
275
275
|
<div id="footer">
|
276
|
-
Generated on
|
276
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
277
277
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
278
278
|
0.9.37 (ruby-3.3.5).
|
279
279
|
</div>
|
@@ -269,7 +269,7 @@ Affected object: </span><span class='embexpr_beg'>#{</span><span class='id ident
|
|
269
269
|
</div>
|
270
270
|
|
271
271
|
<div id="footer">
|
272
|
-
Generated on
|
272
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
273
273
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
274
274
|
0.9.37 (ruby-3.3.5).
|
275
275
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.9.37 (ruby-3.3.5).
|
120
120
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
118
118
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
119
119
|
0.9.37 (ruby-3.3.5).
|
120
120
|
</div>
|
data/doc/Anchormodel/Util.html
CHANGED
@@ -602,7 +602,7 @@
|
|
602
602
|
</div>
|
603
603
|
|
604
604
|
<div id="footer">
|
605
|
-
Generated on
|
605
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
606
606
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
607
607
|
0.9.37 (ruby-3.3.5).
|
608
608
|
</div>
|
@@ -129,7 +129,7 @@
|
|
129
129
|
</div>
|
130
130
|
|
131
131
|
<div id="footer">
|
132
|
-
Generated on
|
132
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
133
133
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
134
134
|
0.9.37 (ruby-3.3.5).
|
135
135
|
</div>
|
data/doc/Anchormodel.html
CHANGED
@@ -243,6 +243,30 @@
|
|
243
243
|
<p>Retrieves a particular value given the key.</p>
|
244
244
|
</div></span>
|
245
245
|
|
246
|
+
</li>
|
247
|
+
|
248
|
+
|
249
|
+
<li class="public ">
|
250
|
+
<span class="summary_signature">
|
251
|
+
|
252
|
+
<a href="#first-class_method" title="first (class method)">.<strong>first</strong> ⇒ Object </a>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
</span>
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
|
266
|
+
<span class="summary_desc"><div class='inline'>
|
267
|
+
<p>Shorthand to satisfy rubocop.</p>
|
268
|
+
</div></span>
|
269
|
+
|
246
270
|
</li>
|
247
271
|
|
248
272
|
|
@@ -487,11 +511,6 @@
|
|
487
511
|
<pre class="lines">
|
488
512
|
|
489
513
|
|
490
|
-
43
|
491
|
-
44
|
492
|
-
45
|
493
|
-
46
|
494
|
-
47
|
495
514
|
48
|
496
515
|
49
|
497
516
|
50
|
@@ -509,10 +528,15 @@
|
|
509
528
|
62
|
510
529
|
63
|
511
530
|
64
|
512
|
-
65
|
531
|
+
65
|
532
|
+
66
|
533
|
+
67
|
534
|
+
68
|
535
|
+
69
|
536
|
+
70</pre>
|
513
537
|
</td>
|
514
538
|
<td>
|
515
|
-
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line
|
539
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 48</span>
|
516
540
|
|
517
541
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
518
542
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_setup!'>setup!</span> <span class='kw'>unless</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_setup_completed'>setup_completed</span>
|
@@ -723,13 +747,13 @@
|
|
723
747
|
<pre class="lines">
|
724
748
|
|
725
749
|
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
750
|
+
40
|
751
|
+
41
|
752
|
+
42
|
753
|
+
43</pre>
|
730
754
|
</td>
|
731
755
|
<td>
|
732
|
-
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line
|
756
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 40</span>
|
733
757
|
|
734
758
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='rparen'>)</span>
|
735
759
|
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
@@ -741,9 +765,9 @@
|
|
741
765
|
</div>
|
742
766
|
|
743
767
|
<div class="method_details ">
|
744
|
-
<h3 class="signature " id="
|
768
|
+
<h3 class="signature " id="first-class_method">
|
745
769
|
|
746
|
-
.<strong>
|
770
|
+
.<strong>first</strong> ⇒ <tt>Object</tt>
|
747
771
|
|
748
772
|
|
749
773
|
|
@@ -752,7 +776,7 @@
|
|
752
776
|
</h3><div class="docstring">
|
753
777
|
<div class="discussion">
|
754
778
|
|
755
|
-
<p>
|
779
|
+
<p>Shorthand to satisfy rubocop</p>
|
756
780
|
|
757
781
|
|
758
782
|
</div>
|
@@ -773,6 +797,47 @@
|
|
773
797
|
<td>
|
774
798
|
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 29</span>
|
775
799
|
|
800
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
801
|
+
<span class='id identifier rubyid_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
|
802
|
+
<span class='kw'>end</span></pre>
|
803
|
+
</td>
|
804
|
+
</tr>
|
805
|
+
</table>
|
806
|
+
</div>
|
807
|
+
|
808
|
+
<div class="method_details ">
|
809
|
+
<h3 class="signature " id="form_collection-class_method">
|
810
|
+
|
811
|
+
.<strong>form_collection</strong> ⇒ <tt>Object</tt>
|
812
|
+
|
813
|
+
|
814
|
+
|
815
|
+
|
816
|
+
|
817
|
+
</h3><div class="docstring">
|
818
|
+
<div class="discussion">
|
819
|
+
|
820
|
+
<p>Returns an array of tuples [label, key] suitable for passing as a collection to some form input helpers</p>
|
821
|
+
|
822
|
+
|
823
|
+
</div>
|
824
|
+
</div>
|
825
|
+
<div class="tags">
|
826
|
+
|
827
|
+
|
828
|
+
</div><table class="source_code">
|
829
|
+
<tr>
|
830
|
+
<td>
|
831
|
+
<pre class="lines">
|
832
|
+
|
833
|
+
|
834
|
+
34
|
835
|
+
35
|
836
|
+
36</pre>
|
837
|
+
</td>
|
838
|
+
<td>
|
839
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 34</span>
|
840
|
+
|
776
841
|
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_form_collection'>form_collection</span>
|
777
842
|
<span class='id identifier rubyid_entries_list'>entries_list</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_el'>el</span><span class='op'>|</span> <span class='lbracket'>[</span><span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_label'>label</span><span class='comma'>,</span> <span class='id identifier rubyid_el'>el</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span> <span class='rbrace'>}</span>
|
778
843
|
<span class='kw'>end</span></pre>
|
@@ -860,12 +925,12 @@
|
|
860
925
|
<pre class="lines">
|
861
926
|
|
862
927
|
|
863
|
-
|
864
|
-
|
865
|
-
|
928
|
+
72
|
929
|
+
73
|
930
|
+
74</pre>
|
866
931
|
</td>
|
867
932
|
<td>
|
868
|
-
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line
|
933
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 72</span>
|
869
934
|
|
870
935
|
<span class='kw'>def</span> <span class='op'>==</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
871
936
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span> <span class='op'>&&</span> <span class='id identifier rubyid_key'>key</span> <span class='op'>==</span> <span class='id identifier rubyid_other'>other</span><span class='period'>.</span><span class='id identifier rubyid_key'>key</span>
|
@@ -899,12 +964,12 @@
|
|
899
964
|
<pre class="lines">
|
900
965
|
|
901
966
|
|
902
|
-
|
903
|
-
|
904
|
-
|
967
|
+
81
|
968
|
+
82
|
969
|
+
83</pre>
|
905
970
|
</td>
|
906
971
|
<td>
|
907
|
-
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line
|
972
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 81</span>
|
908
973
|
|
909
974
|
<span class='kw'>def</span> <span class='id identifier rubyid_inspect'>inspect</span>
|
910
975
|
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>#<</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='embexpr_end'>}</span><span class='tstring_content'><</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>>:</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_hash'>hash</span><span class='embexpr_end'>}</span><span class='tstring_content'>></span><span class='tstring_end'>"</span></span>
|
@@ -940,12 +1005,12 @@
|
|
940
1005
|
<pre class="lines">
|
941
1006
|
|
942
1007
|
|
943
|
-
|
944
|
-
|
945
|
-
|
1008
|
+
77
|
1009
|
+
78
|
1010
|
+
79</pre>
|
946
1011
|
</td>
|
947
1012
|
<td>
|
948
|
-
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line
|
1013
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 77</span>
|
949
1014
|
|
950
1015
|
<span class='kw'>def</span> <span class='id identifier rubyid_label'>label</span>
|
951
1016
|
<span class='const'>I18n</span><span class='period'>.</span><span class='id identifier rubyid_t'>t</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_demodulize'>demodulize</span><span class='embexpr_end'>}</span><span class='tstring_content'>|</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_humanize'>humanize</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
@@ -979,12 +1044,12 @@
|
|
979
1044
|
<pre class="lines">
|
980
1045
|
|
981
1046
|
|
982
|
-
|
983
|
-
|
984
|
-
|
1047
|
+
85
|
1048
|
+
86
|
1049
|
+
87</pre>
|
985
1050
|
</td>
|
986
1051
|
<td>
|
987
|
-
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line
|
1052
|
+
<pre class="code"><span class="info file"># File 'lib/anchormodel.rb', line 85</span>
|
988
1053
|
|
989
1054
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
|
990
1055
|
<span class='id identifier rubyid_inspect'>inspect</span>
|
@@ -999,7 +1064,7 @@
|
|
999
1064
|
</div>
|
1000
1065
|
|
1001
1066
|
<div id="footer">
|
1002
|
-
Generated on
|
1067
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
1003
1068
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1004
1069
|
0.9.37 (ruby-3.3.5).
|
1005
1070
|
</div>
|
@@ -130,7 +130,7 @@
|
|
130
130
|
</div>
|
131
131
|
|
132
132
|
<div id="footer">
|
133
|
-
Generated on
|
133
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
134
134
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
135
135
|
0.9.37 (ruby-3.3.5).
|
136
136
|
</div>
|
@@ -191,7 +191,7 @@
|
|
191
191
|
</div>
|
192
192
|
|
193
193
|
<div id="footer">
|
194
|
-
Generated on
|
194
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
195
195
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
196
196
|
0.9.37 (ruby-3.3.5).
|
197
197
|
</div>
|
data/doc/AnchormodelInput.html
CHANGED
@@ -130,7 +130,7 @@
|
|
130
130
|
</div>
|
131
131
|
|
132
132
|
<div id="footer">
|
133
|
-
Generated on
|
133
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
134
134
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
135
135
|
0.9.37 (ruby-3.3.5).
|
136
136
|
</div>
|
@@ -130,7 +130,7 @@
|
|
130
130
|
</div>
|
131
131
|
|
132
132
|
<div id="footer">
|
133
|
-
Generated on
|
133
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
134
134
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
135
135
|
0.9.37 (ruby-3.3.5).
|
136
136
|
</div>
|
data/doc/_index.html
CHANGED
@@ -220,7 +220,7 @@
|
|
220
220
|
</div>
|
221
221
|
|
222
222
|
<div id="footer">
|
223
|
-
Generated on
|
223
|
+
Generated on Wed Nov 6 17:50:33 2024 by
|
224
224
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
225
225
|
0.9.37 (ruby-3.3.5).
|
226
226
|
</div>
|
data/doc/file.README.html
CHANGED
@@ -339,7 +339,7 @@
|
|
339
339
|
</div></div>
|
340
340
|
|
341
341
|
<div id="footer">
|
342
|
-
Generated on
|
342
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
343
343
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
344
344
|
0.9.37 (ruby-3.3.5).
|
345
345
|
</div>
|
data/doc/index.html
CHANGED
@@ -339,7 +339,7 @@
|
|
339
339
|
</div></div>
|
340
340
|
|
341
341
|
<div id="footer">
|
342
|
-
Generated on
|
342
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
343
343
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
344
344
|
0.9.37 (ruby-3.3.5).
|
345
345
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -145,7 +145,7 @@
|
|
145
145
|
|
146
146
|
<li class="odd ">
|
147
147
|
<div class="item">
|
148
|
-
<span class='object_link'><a href="Anchormodel.html#
|
148
|
+
<span class='object_link'><a href="Anchormodel.html#first-class_method" title="Anchormodel.first (method)">first</a></span>
|
149
149
|
<small>Anchormodel</small>
|
150
150
|
</div>
|
151
151
|
</li>
|
@@ -153,7 +153,7 @@
|
|
153
153
|
|
154
154
|
<li class="even ">
|
155
155
|
<div class="item">
|
156
|
-
<span class='object_link'><a href="Anchormodel.html#
|
156
|
+
<span class='object_link'><a href="Anchormodel.html#form_collection-class_method" title="Anchormodel.form_collection (method)">form_collection</a></span>
|
157
157
|
<small>Anchormodel</small>
|
158
158
|
</div>
|
159
159
|
</li>
|
@@ -161,13 +161,21 @@
|
|
161
161
|
|
162
162
|
<li class="odd ">
|
163
163
|
<div class="item">
|
164
|
-
<span class='object_link'><a href="Anchormodel.html#
|
164
|
+
<span class='object_link'><a href="Anchormodel.html#index-instance_method" title="Anchormodel#index (method)">#index</a></span>
|
165
165
|
<small>Anchormodel</small>
|
166
166
|
</div>
|
167
167
|
</li>
|
168
168
|
|
169
169
|
|
170
170
|
<li class="even ">
|
171
|
+
<div class="item">
|
172
|
+
<span class='object_link'><a href="Anchormodel.html#initialize-instance_method" title="Anchormodel#initialize (method)">#initialize</a></span>
|
173
|
+
<small>Anchormodel</small>
|
174
|
+
</div>
|
175
|
+
</li>
|
176
|
+
|
177
|
+
|
178
|
+
<li class="odd ">
|
171
179
|
<div class="item">
|
172
180
|
<span class='object_link'><a href="Anchormodel/Attribute.html#initialize-instance_method" title="Anchormodel::Attribute#initialize (method)">#initialize</a></span>
|
173
181
|
<small>Anchormodel::Attribute</small>
|
@@ -175,7 +183,7 @@
|
|
175
183
|
</li>
|
176
184
|
|
177
185
|
|
178
|
-
<li class="
|
186
|
+
<li class="even ">
|
179
187
|
<div class="item">
|
180
188
|
<span class='object_link'><a href="Anchormodel/ActiveModelTypeValueSingle.html#initialize-instance_method" title="Anchormodel::ActiveModelTypeValueSingle#initialize (method)">#initialize</a></span>
|
181
189
|
<small>Anchormodel::ActiveModelTypeValueSingle</small>
|
@@ -183,7 +191,7 @@
|
|
183
191
|
</li>
|
184
192
|
|
185
193
|
|
186
|
-
<li class="
|
194
|
+
<li class="odd ">
|
187
195
|
<div class="item">
|
188
196
|
<span class='object_link'><a href="Anchormodel/SimpleFormInputs/Helpers/AnchormodelInputsCommon.html#input-instance_method" title="Anchormodel::SimpleFormInputs::Helpers::AnchormodelInputsCommon#input (method)">#input</a></span>
|
189
197
|
<small>Anchormodel::SimpleFormInputs::Helpers::AnchormodelInputsCommon</small>
|
@@ -191,7 +199,7 @@
|
|
191
199
|
</li>
|
192
200
|
|
193
201
|
|
194
|
-
<li class="
|
202
|
+
<li class="even ">
|
195
203
|
<div class="item">
|
196
204
|
<span class='object_link'><a href="Anchormodel.html#inspect-instance_method" title="Anchormodel#inspect (method)">#inspect</a></span>
|
197
205
|
<small>Anchormodel</small>
|
@@ -199,7 +207,7 @@
|
|
199
207
|
</li>
|
200
208
|
|
201
209
|
|
202
|
-
<li class="
|
210
|
+
<li class="odd ">
|
203
211
|
<div class="item">
|
204
212
|
<span class='object_link'><a href="Anchormodel/Util.html#install_methods_in_model-class_method" title="Anchormodel::Util.install_methods_in_model (method)">install_methods_in_model</a></span>
|
205
213
|
<small>Anchormodel::Util</small>
|
@@ -207,7 +215,7 @@
|
|
207
215
|
</li>
|
208
216
|
|
209
217
|
|
210
|
-
<li class="
|
218
|
+
<li class="even ">
|
211
219
|
<div class="item">
|
212
220
|
<span class='object_link'><a href="Anchormodel.html#key-instance_method" title="Anchormodel#key (method)">#key</a></span>
|
213
221
|
<small>Anchormodel</small>
|
@@ -215,7 +223,7 @@
|
|
215
223
|
</li>
|
216
224
|
|
217
225
|
|
218
|
-
<li class="
|
226
|
+
<li class="odd ">
|
219
227
|
<div class="item">
|
220
228
|
<span class='object_link'><a href="Anchormodel.html#label-instance_method" title="Anchormodel#label (method)">#label</a></span>
|
221
229
|
<small>Anchormodel</small>
|
@@ -223,7 +231,7 @@
|
|
223
231
|
</li>
|
224
232
|
|
225
233
|
|
226
|
-
<li class="
|
234
|
+
<li class="even ">
|
227
235
|
<div class="item">
|
228
236
|
<span class='object_link'><a href="Anchormodel/Attribute.html#multiple%3F-instance_method" title="Anchormodel::Attribute#multiple? (method)">#multiple?</a></span>
|
229
237
|
<small>Anchormodel::Attribute</small>
|
@@ -231,7 +239,7 @@
|
|
231
239
|
</li>
|
232
240
|
|
233
241
|
|
234
|
-
<li class="
|
242
|
+
<li class="odd ">
|
235
243
|
<div class="item">
|
236
244
|
<span class='object_link'><a href="Anchormodel/Attribute.html#optional-instance_method" title="Anchormodel::Attribute#optional (method)">#optional</a></span>
|
237
245
|
<small>Anchormodel::Attribute</small>
|
@@ -239,7 +247,7 @@
|
|
239
247
|
</li>
|
240
248
|
|
241
249
|
|
242
|
-
<li class="
|
250
|
+
<li class="even ">
|
243
251
|
<div class="item">
|
244
252
|
<span class='object_link'><a href="Anchormodel/ActiveModelTypeValueMulti.html#serializable%3F-instance_method" title="Anchormodel::ActiveModelTypeValueMulti#serializable? (method)">#serializable?</a></span>
|
245
253
|
<small>Anchormodel::ActiveModelTypeValueMulti</small>
|
@@ -247,7 +255,7 @@
|
|
247
255
|
</li>
|
248
256
|
|
249
257
|
|
250
|
-
<li class="
|
258
|
+
<li class="odd ">
|
251
259
|
<div class="item">
|
252
260
|
<span class='object_link'><a href="Anchormodel/ActiveModelTypeValueSingle.html#serializable%3F-instance_method" title="Anchormodel::ActiveModelTypeValueSingle#serializable? (method)">#serializable?</a></span>
|
253
261
|
<small>Anchormodel::ActiveModelTypeValueSingle</small>
|
@@ -255,7 +263,7 @@
|
|
255
263
|
</li>
|
256
264
|
|
257
265
|
|
258
|
-
<li class="
|
266
|
+
<li class="even ">
|
259
267
|
<div class="item">
|
260
268
|
<span class='object_link'><a href="Anchormodel/ActiveModelTypeValueMulti.html#serialize-instance_method" title="Anchormodel::ActiveModelTypeValueMulti#serialize (method)">#serialize</a></span>
|
261
269
|
<small>Anchormodel::ActiveModelTypeValueMulti</small>
|
@@ -263,7 +271,7 @@
|
|
263
271
|
</li>
|
264
272
|
|
265
273
|
|
266
|
-
<li class="
|
274
|
+
<li class="odd ">
|
267
275
|
<div class="item">
|
268
276
|
<span class='object_link'><a href="Anchormodel/ActiveModelTypeValueSingle.html#serialize-instance_method" title="Anchormodel::ActiveModelTypeValueSingle#serialize (method)">#serialize</a></span>
|
269
277
|
<small>Anchormodel::ActiveModelTypeValueSingle</small>
|
@@ -271,7 +279,7 @@
|
|
271
279
|
</li>
|
272
280
|
|
273
281
|
|
274
|
-
<li class="
|
282
|
+
<li class="even ">
|
275
283
|
<div class="item">
|
276
284
|
<span class='object_link'><a href="Anchormodel.html#setup!-class_method" title="Anchormodel.setup! (method)">setup!</a></span>
|
277
285
|
<small>Anchormodel</small>
|
@@ -279,7 +287,7 @@
|
|
279
287
|
</li>
|
280
288
|
|
281
289
|
|
282
|
-
<li class="
|
290
|
+
<li class="odd ">
|
283
291
|
<div class="item">
|
284
292
|
<span class='object_link'><a href="Anchormodel.html#to_s-instance_method" title="Anchormodel#to_s (method)">#to_s</a></span>
|
285
293
|
<small>Anchormodel</small>
|
@@ -287,7 +295,7 @@
|
|
287
295
|
</li>
|
288
296
|
|
289
297
|
|
290
|
-
<li class="
|
298
|
+
<li class="even ">
|
291
299
|
<div class="item">
|
292
300
|
<span class='object_link'><a href="Anchormodel/ActiveModelTypeValueSingle.html#type-instance_method" title="Anchormodel::ActiveModelTypeValueSingle#type (method)">#type</a></span>
|
293
301
|
<small>Anchormodel::ActiveModelTypeValueSingle</small>
|
@@ -100,7 +100,7 @@
|
|
100
100
|
</div>
|
101
101
|
|
102
102
|
<div id="footer">
|
103
|
-
Generated on
|
103
|
+
Generated on Wed Nov 6 17:50:34 2024 by
|
104
104
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
105
105
|
0.9.37 (ruby-3.3.5).
|
106
106
|
</div>
|
data/lib/anchormodel.rb
CHANGED
@@ -25,6 +25,11 @@ class Anchormodel
|
|
25
25
|
entries_list
|
26
26
|
end
|
27
27
|
|
28
|
+
# Shorthand to satisfy rubocop
|
29
|
+
def self.first
|
30
|
+
all.first
|
31
|
+
end
|
32
|
+
|
28
33
|
# Returns an array of tuples [label, key] suitable for passing as a collection to some form input helpers
|
29
34
|
def self.form_collection
|
30
35
|
entries_list.map { |el| [el.label, el.key.to_s] }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anchormodel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sandro Kalbermatter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
267
267
|
- !ruby/object:Gem::Version
|
268
268
|
version: '0'
|
269
269
|
requirements: []
|
270
|
-
rubygems_version: 3.
|
270
|
+
rubygems_version: 3.5.22
|
271
271
|
signing_key:
|
272
272
|
specification_version: 4
|
273
273
|
summary: Bringing object-oriented programming to Rails enums
|