active_model-inherited_partials 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/active_model/inherited_partials/version.rb +1 -1
- data/lib/active_model/inherited_partials.rb +3 -3
- metadata +7 -16
- data/app/assets/config/active_model_inherited_partials_manifest.js +0 -1
- data/app/assets/stylesheets/active_model/inherited_partials/application.css +0 -15
- data/app/controllers/active_model/inherited_partials/application_controller.rb +0 -6
- data/app/helpers/active_model/inherited_partials/application_helper.rb +0 -6
- data/app/jobs/active_model/inherited_partials/application_job.rb +0 -6
- data/app/mailers/active_model/inherited_partials/application_mailer.rb +0 -8
- data/app/models/active_model/inherited_partials/application_record.rb +0 -7
- data/app/views/layouts/active_model/inherited_partials/application.html.erb +0 -15
- data/config/routes.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2519af20626ffddd38d67f97c052b8ecbc2e91e9f179b79254173c18fc517eaa
|
4
|
+
data.tar.gz: c76ef6cac6976c74c0d399ee3b74f01df93a86662ee9d45a6354e4355161e590
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b51d6ec10efc6e2bcb688534a228ae5759aaf643faf34701376e4f553d077cd1ab4d86dcdc32f56425061b595fa32a169f9e491acc1031b1ca1da53fdc1ab0cb
|
7
|
+
data.tar.gz: e62f57cf97e25bc169a3b92d5d62622ecfea4ebfeeb13fbc02921f69b36d60afe27d5b3d73314187ade9df6628229041b8bb4cb8e0672b19f7ae64198375e8aa
|
@@ -20,13 +20,13 @@ module ActiveModel
|
|
20
20
|
|
21
21
|
def namespaced_partial_path
|
22
22
|
namespace_model
|
23
|
-
&.then {
|
23
|
+
&.then { it.partial_dir / model_name.element / it.partial_name }
|
24
24
|
&.to_s
|
25
25
|
end
|
26
26
|
|
27
27
|
def namespace_model
|
28
28
|
namespace_classes
|
29
|
-
.reverse.find {
|
29
|
+
.reverse.find { it.respond_to? :model_name }
|
30
30
|
end
|
31
31
|
|
32
32
|
def namespace_classes
|
@@ -35,7 +35,7 @@ module ActiveModel
|
|
35
35
|
.split('::')
|
36
36
|
.each.with_object([]) { |name, namespaces| namespaces << "#{namespaces.last}::#{name}" }
|
37
37
|
.map(&:constantize)
|
38
|
-
.
|
38
|
+
.intersection(ancestors)
|
39
39
|
end
|
40
40
|
|
41
41
|
def find_or_inherit path
|
metadata
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_model-inherited_partials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Senko
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date:
|
10
|
+
date: 2025-03-10 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: rails
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - ">="
|
17
17
|
- !ruby/object:Gem::Version
|
18
18
|
version: '7.1'
|
19
19
|
type: :runtime
|
20
20
|
prerelease: false
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
22
22
|
requirements:
|
23
|
-
- - "
|
23
|
+
- - ">="
|
24
24
|
- !ruby/object:Gem::Version
|
25
25
|
version: '7.1'
|
26
26
|
description: A Rails Engine to let models inherit partials until overridden.
|
@@ -34,15 +34,6 @@ files:
|
|
34
34
|
- MIT-LICENSE
|
35
35
|
- README.md
|
36
36
|
- Rakefile
|
37
|
-
- app/assets/config/active_model_inherited_partials_manifest.js
|
38
|
-
- app/assets/stylesheets/active_model/inherited_partials/application.css
|
39
|
-
- app/controllers/active_model/inherited_partials/application_controller.rb
|
40
|
-
- app/helpers/active_model/inherited_partials/application_helper.rb
|
41
|
-
- app/jobs/active_model/inherited_partials/application_job.rb
|
42
|
-
- app/mailers/active_model/inherited_partials/application_mailer.rb
|
43
|
-
- app/models/active_model/inherited_partials/application_record.rb
|
44
|
-
- app/views/layouts/active_model/inherited_partials/application.html.erb
|
45
|
-
- config/routes.rb
|
46
37
|
- lib/active_model/inherited_partials.rb
|
47
38
|
- lib/active_model/inherited_partials/authors.rb
|
48
39
|
- lib/active_model/inherited_partials/engine.rb
|
@@ -54,7 +45,7 @@ licenses:
|
|
54
45
|
metadata:
|
55
46
|
homepage_uri: https://github.com/Alexander-Senko/active_model-inherited_partials
|
56
47
|
source_code_uri: https://github.com/Alexander-Senko/active_model-inherited_partials
|
57
|
-
changelog_uri: https://github.com/Alexander-Senko/active_model-inherited_partials/blob/v0.1.
|
48
|
+
changelog_uri: https://github.com/Alexander-Senko/active_model-inherited_partials/blob/v0.1.4/CHANGELOG.md
|
58
49
|
rdoc_options: []
|
59
50
|
require_paths:
|
60
51
|
- lib
|
@@ -62,14 +53,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
62
53
|
requirements:
|
63
54
|
- - ">="
|
64
55
|
- !ruby/object:Gem::Version
|
65
|
-
version: '3.
|
56
|
+
version: '3.4'
|
66
57
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
58
|
requirements:
|
68
59
|
- - ">="
|
69
60
|
- !ruby/object:Gem::Version
|
70
61
|
version: '0'
|
71
62
|
requirements: []
|
72
|
-
rubygems_version: 3.6.
|
63
|
+
rubygems_version: 3.6.5
|
73
64
|
specification_version: 4
|
74
65
|
summary: Inheritable partials for Rails
|
75
66
|
test_files: []
|
@@ -1 +0,0 @@
|
|
1
|
-
//= link_directory ../stylesheets/active_model/inherited_partials .css
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
-
* listed below.
|
4
|
-
*
|
5
|
-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
|
7
|
-
*
|
8
|
-
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
|
9
|
-
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
|
10
|
-
* files in this directory. Styles in this file should be added after the last require_* statement.
|
11
|
-
* It is generally better to create a new file per style scope.
|
12
|
-
*
|
13
|
-
*= require_tree .
|
14
|
-
*= require_self
|
15
|
-
*/
|
@@ -1,15 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Active model inherited partials</title>
|
5
|
-
<%= csrf_meta_tags %>
|
6
|
-
<%= csp_meta_tag %>
|
7
|
-
|
8
|
-
<%= stylesheet_link_tag "active_model/inherited_partials/application", media: "all" %>
|
9
|
-
</head>
|
10
|
-
<body>
|
11
|
-
|
12
|
-
<%= yield %>
|
13
|
-
|
14
|
-
</body>
|
15
|
-
</html>
|
data/config/routes.rb
DELETED