slim_form_object 3.3.1 → 3.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/slim_form_object/helpers.rb +10 -4
- data/lib/slim_form_object/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c1edda86a28889a997ba55334211f71950130d5cce53ebe306869947d97776d
|
4
|
+
data.tar.gz: da054ff6c868fd85424689e9288927b31a7af3936e681e211cc1efeaf72378fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d1e14cf1e415781b3aa91f0ba11050763380d36248cf71e694e539b9e374ecc10f0652f766f1ed82347ef6485ec747355738a5d872d4aa8a7272867b85e25a7
|
7
|
+
data.tar.gz: 23e31fae04c45844df16f169f14cadf069a1274e34548ad6494877f5faa0d90aea1ea7d2108012fb4a4d79a43195934bfb7a630e8f53557312a22e744f2aedff
|
@@ -3,11 +3,17 @@ module HelperMethods
|
|
3
3
|
method( snake(model.to_s).to_sym ).call
|
4
4
|
end
|
5
5
|
|
6
|
+
def make_constant_name(snake_model_name, base_module=nil)
|
7
|
+
pref = base_module ? (base_module.to_s + '::') : ''
|
8
|
+
pref + snake_model_name.to_s.split('_').map(&:capitalize).join
|
9
|
+
end
|
10
|
+
|
6
11
|
def get_class_of(snake_model_name, base_module=nil)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
12
|
+
Module.const_get( make_constant_name(snake_model_name, base_module) )
|
13
|
+
rescue NameError => ex
|
14
|
+
unless ex.class == NameError
|
15
|
+
raise ex
|
16
|
+
end
|
11
17
|
end
|
12
18
|
|
13
19
|
def to_bind_models(object_1, object_2)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slim_form_object
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- nerzh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -139,7 +139,7 @@ dependencies:
|
|
139
139
|
description: Very simple automatic generation and saving nested attributes of models
|
140
140
|
from html form. ActiveModel.
|
141
141
|
email:
|
142
|
-
-
|
142
|
+
- emptystamp@gmail.com
|
143
143
|
executables:
|
144
144
|
- slim_form_object
|
145
145
|
extensions: []
|
@@ -167,7 +167,7 @@ files:
|
|
167
167
|
- spec/helpers/models.rb
|
168
168
|
- spec/slim_form_object_spec.rb
|
169
169
|
- spec/spec_helper.rb
|
170
|
-
homepage: https://github.com/
|
170
|
+
homepage: https://github.com/nerzh/slim_form_object
|
171
171
|
licenses:
|
172
172
|
- MIT
|
173
173
|
metadata: {}
|