eac_rails_utils 0.16.0 → 0.17.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db88ebd70fa8c047e4b2cd12103ff8298fbb7ebbcad0424c1b968294bb6685f
|
4
|
+
data.tar.gz: 7c7b0a90c24ff1880b54f885cbeacc5ba015b28a20783ccbb3fb20f945078ad9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8ff3b0df58c0625b4b5bfdcf09d343731790faca24071fb2cd8ae8fd56de6bdb271a8d5b057d843bb4dc43f313ae1ed6935c5369146a2c9bbdd8cd813dab3e8
|
7
|
+
data.tar.gz: 8eefa5bd70d3c81a40656b3f83de88c2d1ec462b1101cc6c0952bbca5c9efa5a82f8c57438d5f2d24c37165306d9bcdf6b512211fe31b55b062b404fc2a4ba86
|
@@ -5,10 +5,15 @@ require 'eac_ruby_utils/core_ext'
|
|
5
5
|
module EacRailsUtils
|
6
6
|
module EngineHelper
|
7
7
|
common_concern do
|
8
|
+
append_autoload_paths
|
8
9
|
append_self_migrations
|
9
10
|
end
|
10
11
|
|
11
12
|
module ClassMethods
|
13
|
+
def append_autoload_paths
|
14
|
+
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
15
|
+
end
|
16
|
+
|
12
17
|
def append_self_migrations
|
13
18
|
initializer :append_migrations do |app|
|
14
19
|
config.paths['db/migrate'].expanded.each do |expanded_path|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: eac_rails_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- E.A.C.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel-associations
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '0.
|
53
|
+
version: '0.104'
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version: '0.
|
60
|
+
version: '0.104'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: htmlbeautifier
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -213,7 +213,6 @@ files:
|
|
213
213
|
- lib/eac_rails_utils/models/test_utils.rb
|
214
214
|
- lib/eac_rails_utils/models/validations.rb
|
215
215
|
- lib/eac_rails_utils/patches.rb
|
216
|
-
- lib/eac_rails_utils/patches/action_controller_base.rb
|
217
216
|
- lib/eac_rails_utils/patches/active_model_associations.rb
|
218
217
|
- lib/eac_rails_utils/patches/numeric.rb
|
219
218
|
- lib/eac_rails_utils/patches/numeric/number_helper.rb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'action_controller/base'
|
4
|
-
|
5
|
-
module EacRailsUtils
|
6
|
-
module Patches
|
7
|
-
module ActionControllerBasePatch
|
8
|
-
def self.included(base)
|
9
|
-
base.include InstanceMethods
|
10
|
-
end
|
11
|
-
|
12
|
-
module InstanceMethods
|
13
|
-
def redirect_back(default_path, options = {})
|
14
|
-
redirect_to :back, options
|
15
|
-
rescue ActionController::RedirectBackError
|
16
|
-
redirect_to default_path, options
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
patch = ::EacRailsUtils::Patches::ActionControllerBasePatch
|
24
|
-
target = ::ActionController::Base
|
25
|
-
target.send(:include, patch) unless target.included_modules.include?(patch)
|