eac_active_scaffold 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8a2b84385c6c948f7c05ca29443e6cec6bb25c54ed58ae92ab5b88ba5f48e5d6
4
- data.tar.gz: 118cf74e6afa4413383cdcb4fb47ef50f2e6cdd4ae348f6f16e53d34649bf738
3
+ metadata.gz: 15eeb7cd52209dcd7b1792f1015873f23a5625bc81f87bf1750683a0e5fb1f8b
4
+ data.tar.gz: ca25f753b424546985e77114b6b6d10397b98db3083ef3010ddee92f8b820b5d
5
5
  SHA512:
6
- metadata.gz: cbad4f89cda4b72dd36a1b104f6b6f165c300ce43930055fcf1fb86cb0af120d07036e262fa42338d269d484a0ff321a7fdc2151235cf7cbdc534dfc35b7af0b
7
- data.tar.gz: 0e255fe1f85fc499047fe066b6cdb78c4e3059e64796f7e7c41853aa0b920ca9d22082a43e3f6212e7614e0a1037f483e5021a82fa231f96e2ece79fbf895468
6
+ metadata.gz: 816e9542df81682cd1ffeaeee35f94654f26fed39a71dd250e9e3a45bba53a4b1b947501c69d13f37f58bfb910215c4ef6142a55d2d527c48d4a419e5109e7d5
7
+ data.tar.gz: 0555a674d110339cb5d551bd72314bc6ceb204dee8e5ed657adb968270b5871e3df3de771eaad44b750905b9889a5b9ea6f399cd26a531c83218dd601cf5cee2
@@ -3,22 +3,16 @@
3
3
  module EacActiveScaffold
4
4
  module Patches
5
5
  module ActionDispatch
6
- ACTIVE_SCAFFOLD_DEFAULT_CONCERN_NAME = :active_scaffold
6
+ ACTIVE_SCAFFOLD_CONCERNS = {
7
+ active_scaffold: -> { ::ActiveScaffold::Routing::Basic.new(association: true) },
8
+ active_scaffold_association: -> { ::ActiveScaffold::Routing::Association.new }
9
+ }.freeze
7
10
 
8
- def active_scaffold
9
- active_scaffold_concern_set
10
- active_scaffold_concern_name
11
- end
12
-
13
- def active_scaffold_concern_set
14
- return if @concerns.key?(active_scaffold_concern_name)
15
-
16
- concern(active_scaffold_concern_name,
17
- ::ActiveScaffold::Routing::Basic.new(association: true))
18
- end
19
-
20
- def active_scaffold_concern_name
21
- ACTIVE_SCAFFOLD_DEFAULT_CONCERN_NAME
11
+ ACTIVE_SCAFFOLD_CONCERNS.each do |name, proc|
12
+ define_method name do
13
+ concern(name, proc.call) unless @concerns.key?(name)
14
+ name
15
+ end
22
16
  end
23
17
  end
24
18
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacActiveScaffold
4
- VERSION = '0.1.0'
4
+ VERSION = '0.2.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_active_scaffold
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Put here the authors
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 3.5.5
19
+ version: 3.6.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 3.5.5
26
+ version: 3.6.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: eac_ruby_utils
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.74'
41
41
  - !ruby/object:Gem::Dependency
42
- name: eac_ruby_gem_support
42
+ name: eac_rails_gem_support
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.4'
47
+ version: '0.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.4'
54
+ version: '0.3'
55
55
  description:
56
56
  email:
57
57
  executables: []