compony 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +31 -0
- data/VERSION +1 -1
- data/compony.gemspec +4 -4
- data/config/routes.rb +9 -6
- data/doc/ComponentGenerator.html +3 -3
- data/doc/Components.html +3 -3
- data/doc/ComponentsGenerator.html +3 -3
- data/doc/Compony/Component.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Labelling.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html +40 -28
- data/doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html +3 -3
- data/doc/Compony/ComponentMixins/Default/Standalone.html +3 -3
- data/doc/Compony/ComponentMixins/Default.html +3 -3
- data/doc/Compony/ComponentMixins/Resourceful.html +3 -3
- data/doc/Compony/ComponentMixins.html +3 -3
- data/doc/Compony/Components/Button.html +3 -3
- data/doc/Compony/Components/Destroy.html +3 -3
- data/doc/Compony/Components/Edit.html +3 -3
- data/doc/Compony/Components/Form.html +3 -3
- data/doc/Compony/Components/New.html +3 -3
- data/doc/Compony/Components/WithForm.html +3 -3
- data/doc/Compony/Components.html +3 -3
- data/doc/Compony/ControllerMixin.html +3 -3
- data/doc/Compony/Engine.html +3 -3
- data/doc/Compony/MethodAccessibleHash.html +3 -3
- data/doc/Compony/ModelFields/Anchormodel.html +3 -3
- data/doc/Compony/ModelFields/Association.html +4 -4
- data/doc/Compony/ModelFields/Attachment.html +3 -3
- data/doc/Compony/ModelFields/Base.html +3 -3
- data/doc/Compony/ModelFields/Boolean.html +3 -3
- data/doc/Compony/ModelFields/Color.html +3 -3
- data/doc/Compony/ModelFields/Currency.html +3 -3
- data/doc/Compony/ModelFields/Date.html +3 -3
- data/doc/Compony/ModelFields/Datetime.html +3 -3
- data/doc/Compony/ModelFields/Decimal.html +3 -3
- data/doc/Compony/ModelFields/Email.html +3 -3
- data/doc/Compony/ModelFields/Float.html +3 -3
- data/doc/Compony/ModelFields/Integer.html +3 -3
- data/doc/Compony/ModelFields/Percentage.html +3 -3
- data/doc/Compony/ModelFields/Phone.html +3 -3
- data/doc/Compony/ModelFields/RichText.html +3 -3
- data/doc/Compony/ModelFields/String.html +3 -3
- data/doc/Compony/ModelFields/Text.html +3 -3
- data/doc/Compony/ModelFields/Time.html +3 -3
- data/doc/Compony/ModelFields/Url.html +3 -3
- data/doc/Compony/ModelFields.html +3 -3
- data/doc/Compony/ModelMixin.html +25 -25
- data/doc/Compony/NaturalOrdering.html +3 -3
- data/doc/Compony/RequestContext.html +3 -3
- data/doc/Compony/Version.html +3 -3
- data/doc/Compony/ViewHelpers.html +3 -3
- data/doc/Compony.html +3 -3
- data/doc/ComponyController.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 +33 -3
- data/doc/file_list.html +5 -2
- data/doc/frames.html +10 -5
- data/doc/index.html +33 -3
- data/doc/js/app.js +294 -264
- data/doc/js/full_list.js +30 -4
- data/doc/method_list.html +5 -2
- data/doc/top-level-namespace.html +3 -3
- data/lib/compony/component_mixins/default/standalone/standalone_dsl.rb +7 -1
- data/lib/compony/model_fields/association.rb +1 -1
- data/lib/compony/model_mixin.rb +5 -1
- 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: '082392b74ba9046a57c2d3fdb16da79d0264507c60befaae9c33134fc02e78d2'
|
4
|
+
data.tar.gz: c70885ada0fad2cdd36a1f460756c50da9015bb94f5ad538b64dac23d3fec886
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32061daaa065de383ffe2b069ceb519aa1ec338eba400e6379358ce6d290497cf3d76725a2d37f409ce37ec28c168f0bae8de7e3fc2d6e3dbbe514d5d492dcea
|
7
|
+
data.tar.gz: 9e7cef0789358bd6ed716990ea9ecbe52bbdc0657dfb5930f5a8273a2b0e24ed925815f649f08ff0cdd2588e4f68d56a56c03129dc93e966c1dfc2b2dfd39b0a
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,13 @@
|
|
1
|
+
# 0.5.2
|
2
|
+
|
3
|
+
- Add `constraints` to `standalone`
|
4
|
+
- Add `scope` and `scope_args` to `standalone`
|
5
|
+
- Set default `label_method` to `label` when generating a `simple_form` input for `:association`
|
6
|
+
|
7
|
+
# 0.5.1
|
8
|
+
|
9
|
+
- Correctly handle `ActiveType::Object` virtual fields in Rails 7.2
|
10
|
+
|
1
11
|
# 0.5.0
|
2
12
|
|
3
13
|
- Require Ruby 3.3.5 and Rails 7.2.1
|
data/README.md
CHANGED
@@ -654,6 +654,36 @@ Rails controller redirects can be issued both in a verb DSL's `respond` block an
|
|
654
654
|
- If you want to redirect depending on the HTTP verb, use `respond`.
|
655
655
|
- If you want to redirect depending on params, state, time etc. **independently of the HTTP verb**, use `before_render`, as this is more convenient than writing a standalone -> verb -> respond tree.
|
656
656
|
|
657
|
+
### Path constraints
|
658
|
+
|
659
|
+
When calling `standalone`, you may specify the keyword `constraints` that will be passed to the route. For example:
|
660
|
+
|
661
|
+
```ruby
|
662
|
+
# In your component
|
663
|
+
standelone path: '/:lang', constraints: { lang: /([a-z]{2})?/i }
|
664
|
+
|
665
|
+
# This will automatically lead to a route of this form:
|
666
|
+
get ':lang', constraints: { lang: /([a-z]{2})?/i }
|
667
|
+
```
|
668
|
+
|
669
|
+
### Passing scopes
|
670
|
+
|
671
|
+
When calling `standalone`, you may specify the keyword `scope` to wrap the component's Rails route into a route scope. Additionally, you may specify a hash `scope_args`, which will be passed as keyword arguments to the `scope` call in the route:
|
672
|
+
|
673
|
+
```ruby
|
674
|
+
# In your component
|
675
|
+
standalone path: '/welcome', scope: '(:lang)', scope_args: { lang: /([a-z]{2})?/i } do
|
676
|
+
verb :get do
|
677
|
+
# ....
|
678
|
+
end
|
679
|
+
end
|
680
|
+
|
681
|
+
# This will automatically lead to a route of this form:
|
682
|
+
scope '(:lang)', lang: /([a-z]{2})?/i do
|
683
|
+
get 'welcome', to: 'compony#your_component'
|
684
|
+
end
|
685
|
+
```
|
686
|
+
|
657
687
|
## Inheritance
|
658
688
|
|
659
689
|
When inheriting from another component class, `setup` can be called in the child as well in order to overwrite specified configurations. The parent's `setup` block will be run first, then the child's, then the grand-child's and so on.
|
@@ -1507,6 +1537,7 @@ Compony is Free Software under the LGPLv3 and you are most welcome to contribute
|
|
1507
1537
|
- Feasibility:
|
1508
1538
|
- The feasibility framework does not yet enforce prevention, but only has effects on buttons. Actions should be structured more explicitly such that prevention becomes as tight as authorization.
|
1509
1539
|
- Feasibility for links is not yet implemented.
|
1540
|
+
- Compony is not compatible with `tailwindcss-rails`. This is likely due to Tailwind automatically removing any CSS that is not used by the application and the usage detection not picking up Compony components, as their content is not provided in views.
|
1510
1541
|
|
1511
1542
|
# Acknowledgements
|
1512
1543
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/compony.gemspec
CHANGED
@@ -2,19 +2,19 @@
|
|
2
2
|
# This file is auto-generated via: 'rake gemspec'.
|
3
3
|
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: compony 0.5.
|
5
|
+
# stub: compony 0.5.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "compony".freeze
|
9
|
-
s.version = "0.5.
|
9
|
+
s.version = "0.5.2".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, "contributors".freeze]
|
14
|
-
s.date = "2024-
|
14
|
+
s.date = "2024-11-20"
|
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, "TODO.md".freeze, "VERSION".freeze, "app/controllers/compony_controller.rb".freeze, "compony.gemspec".freeze, "config/locales/de.yml".freeze, "config/locales/en.yml".freeze, "config/locales/fr.yml".freeze, "config/routes.rb".freeze, "doc/ComponentGenerator.html".freeze, "doc/Components.html".freeze, "doc/ComponentsGenerator.html".freeze, "doc/Compony.html".freeze, "doc/Compony/Component.html".freeze, "doc/Compony/ComponentMixins.html".freeze, "doc/Compony/ComponentMixins/Default.html".freeze, "doc/Compony/ComponentMixins/Default/Labelling.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone/ResourcefulVerbDsl.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone/StandaloneDsl.html".freeze, "doc/Compony/ComponentMixins/Default/Standalone/VerbDsl.html".freeze, "doc/Compony/ComponentMixins/Resourceful.html".freeze, "doc/Compony/Components.html".freeze, "doc/Compony/Components/Button.html".freeze, "doc/Compony/Components/Destroy.html".freeze, "doc/Compony/Components/Edit.html".freeze, "doc/Compony/Components/Form.html".freeze, "doc/Compony/Components/New.html".freeze, "doc/Compony/Components/WithForm.html".freeze, "doc/Compony/ControllerMixin.html".freeze, "doc/Compony/Engine.html".freeze, "doc/Compony/MethodAccessibleHash.html".freeze, "doc/Compony/ModelFields.html".freeze, "doc/Compony/ModelFields/Anchormodel.html".freeze, "doc/Compony/ModelFields/Association.html".freeze, "doc/Compony/ModelFields/Attachment.html".freeze, "doc/Compony/ModelFields/Base.html".freeze, "doc/Compony/ModelFields/Boolean.html".freeze, "doc/Compony/ModelFields/Color.html".freeze, "doc/Compony/ModelFields/Currency.html".freeze, "doc/Compony/ModelFields/Date.html".freeze, "doc/Compony/ModelFields/Datetime.html".freeze, "doc/Compony/ModelFields/Decimal.html".freeze, "doc/Compony/ModelFields/Email.html".freeze, "doc/Compony/ModelFields/Float.html".freeze, "doc/Compony/ModelFields/Integer.html".freeze, "doc/Compony/ModelFields/Percentage.html".freeze, "doc/Compony/ModelFields/Phone.html".freeze, "doc/Compony/ModelFields/RichText.html".freeze, "doc/Compony/ModelFields/String.html".freeze, "doc/Compony/ModelFields/Text.html".freeze, "doc/Compony/ModelFields/Time.html".freeze, "doc/Compony/ModelFields/Url.html".freeze, "doc/Compony/ModelMixin.html".freeze, "doc/Compony/NaturalOrdering.html".freeze, "doc/Compony/RequestContext.html".freeze, "doc/Compony/Version.html".freeze, "doc/Compony/ViewHelpers.html".freeze, "doc/ComponyController.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/imgs/intro-example-destroy.png".freeze, "doc/imgs/intro-example-edit.png".freeze, "doc/imgs/intro-example-index.png".freeze, "doc/imgs/intro-example-new.png".freeze, "doc/imgs/intro-example-show.png".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/resourceful_lifecycle.graphml".freeze, "doc/resourceful_lifecycle.pdf".freeze, "doc/resourceful_lifecycle.png".freeze, "doc/top-level-namespace.html".freeze, "lib/compony.rb".freeze, "lib/compony/component.rb".freeze, "lib/compony/component_mixins/default/labelling.rb".freeze, "lib/compony/component_mixins/default/standalone.rb".freeze, "lib/compony/component_mixins/default/standalone/resourceful_verb_dsl.rb".freeze, "lib/compony/component_mixins/default/standalone/standalone_dsl.rb".freeze, "lib/compony/component_mixins/default/standalone/verb_dsl.rb".freeze, "lib/compony/component_mixins/resourceful.rb".freeze, "lib/compony/components/button.rb".freeze, "lib/compony/components/destroy.rb".freeze, "lib/compony/components/edit.rb".freeze, "lib/compony/components/form.rb".freeze, "lib/compony/components/new.rb".freeze, "lib/compony/components/with_form.rb".freeze, "lib/compony/controller_mixin.rb".freeze, "lib/compony/engine.rb".freeze, "lib/compony/method_accessible_hash.rb".freeze, "lib/compony/model_fields/anchormodel.rb".freeze, "lib/compony/model_fields/association.rb".freeze, "lib/compony/model_fields/attachment.rb".freeze, "lib/compony/model_fields/base.rb".freeze, "lib/compony/model_fields/boolean.rb".freeze, "lib/compony/model_fields/color.rb".freeze, "lib/compony/model_fields/currency.rb".freeze, "lib/compony/model_fields/date.rb".freeze, "lib/compony/model_fields/datetime.rb".freeze, "lib/compony/model_fields/decimal.rb".freeze, "lib/compony/model_fields/email.rb".freeze, "lib/compony/model_fields/float.rb".freeze, "lib/compony/model_fields/integer.rb".freeze, "lib/compony/model_fields/percentage.rb".freeze, "lib/compony/model_fields/phone.rb".freeze, "lib/compony/model_fields/rich_text.rb".freeze, "lib/compony/model_fields/string.rb".freeze, "lib/compony/model_fields/text.rb".freeze, "lib/compony/model_fields/time.rb".freeze, "lib/compony/model_fields/url.rb".freeze, "lib/compony/model_mixin.rb".freeze, "lib/compony/natural_ordering.rb".freeze, "lib/compony/request_context.rb".freeze, "lib/compony/version.rb".freeze, "lib/compony/view_helpers.rb".freeze, "lib/generators/component/USAGE".freeze, "lib/generators/component/component_generator.rb".freeze, "lib/generators/component/templates/component.rb.erb".freeze, "lib/generators/component/templates/destroy.rb.erb".freeze, "lib/generators/component/templates/edit.rb.erb".freeze, "lib/generators/component/templates/form.rb.erb".freeze, "lib/generators/component/templates/new.rb.erb".freeze, "lib/generators/components/USAGE".freeze, "lib/generators/components/components_generator.rb".freeze, "logo.svg".freeze]
|
16
16
|
s.required_ruby_version = Gem::Requirement.new(">= 3.3.5".freeze)
|
17
|
-
s.rubygems_version = "3.5.
|
17
|
+
s.rubygems_version = "3.5.22".freeze
|
18
18
|
s.summary = "Compony is a Gem that allows you to write your Rails application in component-style fashion. It combines a controller action and route along \\ with its view into a single Ruby class. This allows writing much DRYer code, using inheritance even in views and much easier refactoring for your Rails \\ applications, helping you to keep the code clean as the application evolves.".freeze
|
19
19
|
|
20
20
|
s.specification_version = 4
|
data/config/routes.rb
CHANGED
@@ -6,12 +6,15 @@ Rails.application.routes.draw do
|
|
6
6
|
# Standalone configs are already grouped in a hash, one entry per name/path
|
7
7
|
comp.standalone_configs.each_value do |standalone_config|
|
8
8
|
next if standalone_config[:path].blank? # Ignore incomplete standalone configs (these come from parent classes )
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
9
|
+
scope standalone_config[:scope], **standalone_config[:scope_args] do
|
10
|
+
match(
|
11
|
+
standalone_config.path,
|
12
|
+
constraints: standalone_config[:constraints],
|
13
|
+
to: "compony##{standalone_config.rails_action_name}",
|
14
|
+
as: standalone_config.path_helper_name,
|
15
|
+
via: standalone_config.verbs.keys
|
16
|
+
)
|
17
|
+
end
|
15
18
|
end
|
16
19
|
end
|
17
20
|
end
|
data/doc/ComponentGenerator.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: ComponentGenerator
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -221,9 +221,9 @@
|
|
221
221
|
</div>
|
222
222
|
|
223
223
|
<div id="footer">
|
224
|
-
Generated on
|
224
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
225
225
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
226
|
-
0.9.
|
226
|
+
0.9.37 (ruby-3.3.5).
|
227
227
|
</div>
|
228
228
|
|
229
229
|
</div>
|
data/doc/Components.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Components
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -95,9 +95,9 @@
|
|
95
95
|
</div>
|
96
96
|
|
97
97
|
<div id="footer">
|
98
|
-
Generated on
|
98
|
+
Generated on Wed Nov 20 10:54:24 2024 by
|
99
99
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
100
|
-
0.9.
|
100
|
+
0.9.37 (ruby-3.3.5).
|
101
101
|
</div>
|
102
102
|
|
103
103
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: ComponentsGenerator
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -193,9 +193,9 @@
|
|
193
193
|
</div>
|
194
194
|
|
195
195
|
<div id="footer">
|
196
|
-
Generated on
|
196
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
197
197
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
198
|
-
0.9.
|
198
|
+
0.9.37 (ruby-3.3.5).
|
199
199
|
</div>
|
200
200
|
|
201
201
|
</div>
|
data/doc/Compony/Component.html
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Component
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -2503,9 +2503,9 @@
|
|
2503
2503
|
</div>
|
2504
2504
|
|
2505
2505
|
<div id="footer">
|
2506
|
-
Generated on
|
2506
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
2507
2507
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2508
|
-
0.9.
|
2508
|
+
0.9.37 (ruby-3.3.5).
|
2509
2509
|
</div>
|
2510
2510
|
|
2511
2511
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Compony::ComponentMixins::Default::Labelling
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -396,9 +396,9 @@
|
|
396
396
|
</div>
|
397
397
|
|
398
398
|
<div id="footer">
|
399
|
-
Generated on
|
399
|
+
Generated on Wed Nov 20 10:54:24 2024 by
|
400
400
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
401
|
-
0.9.
|
401
|
+
0.9.37 (ruby-3.3.5).
|
402
402
|
</div>
|
403
403
|
|
404
404
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::ComponentMixins::Default::Standalone::ResourcefulVerbDsl
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -529,9 +529,9 @@
|
|
529
529
|
</div>
|
530
530
|
|
531
531
|
<div id="footer">
|
532
|
-
Generated on
|
532
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
533
533
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
534
|
-
0.9.
|
534
|
+
0.9.37 (ruby-3.3.5).
|
535
535
|
</div>
|
536
536
|
|
537
537
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::ComponentMixins::Default::Standalone::StandaloneDsl
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -130,7 +130,7 @@
|
|
130
130
|
<li class="public ">
|
131
131
|
<span class="summary_signature">
|
132
132
|
|
133
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil) ⇒ StandaloneDsl </a>
|
133
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil, constraints: nil, scope: nil, scope_args: {}) ⇒ StandaloneDsl </a>
|
134
134
|
|
135
135
|
|
136
136
|
|
@@ -259,7 +259,7 @@
|
|
259
259
|
<div class="method_details first">
|
260
260
|
<h3 class="signature first" id="initialize-instance_method">
|
261
261
|
|
262
|
-
#<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil) ⇒ <tt><span class='object_link'><a href="" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span></tt>
|
262
|
+
#<strong>initialize</strong>(component, name = nil, provide_defaults:, path: nil, constraints: nil, scope: nil, scope_args: {}) ⇒ <tt><span class='object_link'><a href="" title="Compony::ComponentMixins::Default::Standalone::StandaloneDsl (class)">StandaloneDsl</a></span></tt>
|
263
263
|
|
264
264
|
|
265
265
|
|
@@ -291,17 +291,23 @@
|
|
291
291
|
15
|
292
292
|
16
|
293
293
|
17
|
294
|
-
18
|
294
|
+
18
|
295
|
+
19
|
296
|
+
20
|
297
|
+
21</pre>
|
295
298
|
</td>
|
296
299
|
<td>
|
297
300
|
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 9</span>
|
298
301
|
|
299
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>provide_defaults:</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
302
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_component'>component</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>provide_defaults:</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>constraints:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>scope:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>scope_args:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
300
303
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
301
304
|
<span class='ivar'>@component</span> <span class='op'>=</span> <span class='id identifier rubyid_component'>component</span>
|
302
305
|
<span class='ivar'>@name</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='op'>&.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
303
306
|
<span class='ivar'>@provide_defaults</span> <span class='op'>=</span> <span class='id identifier rubyid_provide_defaults'>provide_defaults</span>
|
304
307
|
<span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span>
|
308
|
+
<span class='ivar'>@constraints</span> <span class='op'>=</span> <span class='id identifier rubyid_constraints'>constraints</span>
|
309
|
+
<span class='ivar'>@scope</span> <span class='op'>=</span> <span class='id identifier rubyid_scope'>scope</span>
|
310
|
+
<span class='ivar'>@scope_args</span> <span class='op'>=</span> <span class='id identifier rubyid_scope_args'>scope_args</span>
|
305
311
|
<span class='ivar'>@verbs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
306
312
|
<span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>false</span>
|
307
313
|
<span class='ivar'>@layout</span> <span class='op'>=</span> <span class='kw'>true</span> <span class='comment'># can be overriden by false or a string
|
@@ -364,12 +370,12 @@
|
|
364
370
|
<pre class="lines">
|
365
371
|
|
366
372
|
|
367
|
-
|
368
|
-
|
369
|
-
|
373
|
+
72
|
374
|
+
73
|
375
|
+
74</pre>
|
370
376
|
</td>
|
371
377
|
<td>
|
372
|
-
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line
|
378
|
+
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 72</span>
|
373
379
|
|
374
380
|
<span class='kw'>def</span> <span class='id identifier rubyid_layout'>layout</span><span class='lparen'>(</span><span class='id identifier rubyid_layout'>layout</span><span class='rparen'>)</span>
|
375
381
|
<span class='ivar'>@layout</span> <span class='op'>=</span> <span class='id identifier rubyid_layout'>layout</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
|
@@ -405,12 +411,12 @@
|
|
405
411
|
<pre class="lines">
|
406
412
|
|
407
413
|
|
408
|
-
|
409
|
-
|
410
|
-
|
414
|
+
64
|
415
|
+
65
|
416
|
+
66</pre>
|
411
417
|
</td>
|
412
418
|
<td>
|
413
|
-
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line
|
419
|
+
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 64</span>
|
414
420
|
|
415
421
|
<span class='kw'>def</span> <span class='id identifier rubyid_skip_authentication!'>skip_authentication!</span>
|
416
422
|
<span class='ivar'>@skip_authentication</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -446,9 +452,6 @@
|
|
446
452
|
<pre class="lines">
|
447
453
|
|
448
454
|
|
449
|
-
21
|
450
|
-
22
|
451
|
-
23
|
452
455
|
24
|
453
456
|
25
|
454
457
|
26
|
@@ -458,10 +461,16 @@
|
|
458
461
|
30
|
459
462
|
31
|
460
463
|
32
|
461
|
-
33
|
464
|
+
33
|
465
|
+
34
|
466
|
+
35
|
467
|
+
36
|
468
|
+
37
|
469
|
+
38
|
470
|
+
39</pre>
|
462
471
|
</td>
|
463
472
|
<td>
|
464
|
-
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line
|
473
|
+
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 24</span>
|
465
474
|
|
466
475
|
<span class='kw'>def</span> <span class='id identifier rubyid_to_conf'>to_conf</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
467
476
|
<span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
@@ -469,6 +478,9 @@
|
|
469
478
|
</span> <span class='kw'>return</span> <span class='lbrace'>{</span>
|
470
479
|
<span class='label'>name:</span> <span class='ivar'>@name</span><span class='comma'>,</span>
|
471
480
|
<span class='label'>path:</span> <span class='ivar'>@path</span><span class='comma'>,</span>
|
481
|
+
<span class='label'>constraints:</span> <span class='ivar'>@constraints</span><span class='comma'>,</span>
|
482
|
+
<span class='label'>scope:</span> <span class='ivar'>@scope</span><span class='comma'>,</span>
|
483
|
+
<span class='label'>scope_args:</span> <span class='ivar'>@scope_args</span><span class='comma'>,</span>
|
472
484
|
<span class='label'>verbs:</span> <span class='ivar'>@verbs</span><span class='comma'>,</span>
|
473
485
|
<span class='label'>rails_action_name:</span> <span class='const'><span class='object_link'><a href="../../../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_rails_action_name'><span class='object_link'><a href="../../../../Compony.html#rails_action_name-class_method" title="Compony.rails_action_name (method)">rails_action_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='comma'>,</span> <span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
|
474
486
|
<span class='label'>path_helper_name:</span> <span class='const'><span class='object_link'><a href="../../../../Compony.html" title="Compony (module)">Compony</a></span></span><span class='period'>.</span><span class='id identifier rubyid_path_helper_name'><span class='object_link'><a href="../../../../Compony.html#path_helper_name-class_method" title="Compony.path_helper_name (method)">path_helper_name</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_comp_name'>comp_name</span><span class='comma'>,</span> <span class='id identifier rubyid_family_name'>family_name</span><span class='comma'>,</span> <span class='ivar'>@name</span><span class='rparen'>)</span><span class='comma'>,</span>
|
@@ -534,12 +546,6 @@
|
|
534
546
|
<pre class="lines">
|
535
547
|
|
536
548
|
|
537
|
-
40
|
538
|
-
41
|
539
|
-
42
|
540
|
-
43
|
541
|
-
44
|
542
|
-
45
|
543
549
|
46
|
544
550
|
47
|
545
551
|
48
|
@@ -548,10 +554,16 @@
|
|
548
554
|
51
|
549
555
|
52
|
550
556
|
53
|
551
|
-
54
|
557
|
+
54
|
558
|
+
55
|
559
|
+
56
|
560
|
+
57
|
561
|
+
58
|
562
|
+
59
|
563
|
+
60</pre>
|
552
564
|
</td>
|
553
565
|
<td>
|
554
|
-
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line
|
566
|
+
<pre class="code"><span class="info file"># File 'lib/compony/component_mixins/default/standalone/standalone_dsl.rb', line 46</span>
|
555
567
|
|
556
568
|
<span class='kw'>def</span> <span class='id identifier rubyid_verb'>verb</span><span class='lparen'>(</span><span class='id identifier rubyid_verb'>verb</span><span class='comma'>,</span> <span class='op'>*</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_nargs'>nargs</span><span class='comma'>,</span> <span class='op'>&</span><span class='rparen'>)</span>
|
557
569
|
<span class='id identifier rubyid_verb'>verb</span> <span class='op'>=</span> <span class='id identifier rubyid_verb'>verb</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span>
|
@@ -578,9 +590,9 @@
|
|
578
590
|
</div>
|
579
591
|
|
580
592
|
<div id="footer">
|
581
|
-
Generated on
|
593
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
582
594
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
583
|
-
0.9.
|
595
|
+
0.9.37 (ruby-3.3.5).
|
584
596
|
</div>
|
585
597
|
|
586
598
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::ComponentMixins::Default::Standalone::VerbDsl
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -567,9 +567,9 @@
|
|
567
567
|
</div>
|
568
568
|
|
569
569
|
<div id="footer">
|
570
|
-
Generated on
|
570
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
571
571
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
572
|
-
0.9.
|
572
|
+
0.9.37 (ruby-3.3.5).
|
573
573
|
</div>
|
574
574
|
|
575
575
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Compony::ComponentMixins::Default::Standalone
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -682,9 +682,9 @@
|
|
682
682
|
</div>
|
683
683
|
|
684
684
|
<div id="footer">
|
685
|
-
Generated on
|
685
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
686
686
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
687
|
-
0.9.
|
687
|
+
0.9.37 (ruby-3.3.5).
|
688
688
|
</div>
|
689
689
|
|
690
690
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Compony::ComponentMixins::Default
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Wed Nov 20 10:54:24 2024 by
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.9.
|
121
|
+
0.9.37 (ruby-3.3.5).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Compony::ComponentMixins::Resourceful
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -1183,9 +1183,9 @@
|
|
1183
1183
|
</div>
|
1184
1184
|
|
1185
1185
|
<div id="footer">
|
1186
|
-
Generated on
|
1186
|
+
Generated on Wed Nov 20 10:54:24 2024 by
|
1187
1187
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1188
|
-
0.9.
|
1188
|
+
0.9.37 (ruby-3.3.5).
|
1189
1189
|
</div>
|
1190
1190
|
|
1191
1191
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: Compony::ComponentMixins
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Wed Nov 20 10:54:24 2024 by
|
120
120
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.9.
|
121
|
+
0.9.37 (ruby-3.3.5).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Button
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -283,9 +283,9 @@
|
|
283
283
|
</div>
|
284
284
|
|
285
285
|
<div id="footer">
|
286
|
-
Generated on
|
286
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
287
287
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
288
|
-
0.9.
|
288
|
+
0.9.37 (ruby-3.3.5).
|
289
289
|
</div>
|
290
290
|
|
291
291
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Destroy
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -374,9 +374,9 @@
|
|
374
374
|
</div>
|
375
375
|
|
376
376
|
<div id="footer">
|
377
|
-
Generated on
|
377
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
378
378
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
379
|
-
0.9.
|
379
|
+
0.9.37 (ruby-3.3.5).
|
380
380
|
</div>
|
381
381
|
|
382
382
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Edit
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -452,9 +452,9 @@
|
|
452
452
|
</div>
|
453
453
|
|
454
454
|
<div id="footer">
|
455
|
-
Generated on
|
455
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
456
456
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
457
|
-
0.9.
|
457
|
+
0.9.37 (ruby-3.3.5).
|
458
458
|
</div>
|
459
459
|
|
460
460
|
</div>
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Class: Compony::Components::Form
|
8
8
|
|
9
|
-
— Documentation by YARD 0.9.
|
9
|
+
— Documentation by YARD 0.9.37
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -1328,9 +1328,9 @@
|
|
1328
1328
|
</div>
|
1329
1329
|
|
1330
1330
|
<div id="footer">
|
1331
|
-
Generated on
|
1331
|
+
Generated on Wed Nov 20 10:54:25 2024 by
|
1332
1332
|
<a href="https://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1333
|
-
0.9.
|
1333
|
+
0.9.37 (ruby-3.3.5).
|
1334
1334
|
</div>
|
1335
1335
|
|
1336
1336
|
</div>
|