chop 0.23.8 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/chop/create.rb +2 -0
- data/lib/chop/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: af7f4ec5f90dbc90ca3dd23f091388583a1f5685a8d2701f56a2779134e07702
|
4
|
+
data.tar.gz: 019b73dd3bd79756bc5b83acb65b73994cd61875fa1c940bbc6cc9e1ef497ea3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 308830226d83493873bf32aa8b071b1c006306d875ea146df4b8c7fc1c7b09f105b020cab17fa847b6461ba7dd74a5decd2a1e0fa3788b173311f869e49471c1
|
7
|
+
data.tar.gz: f7b9d15d9550dc2a3bfc1b0001413a3a735d15296edcf6b89b4b0da95fcb9cacb24dbb6ac2d2ac5a92e43acfa3105570f32a4bb9c59623c8170ca47435518a2d
|
data/lib/chop/create.rb
CHANGED
@@ -144,6 +144,7 @@ module Chop
|
|
144
144
|
end
|
145
145
|
|
146
146
|
def has_many key, klass=nil, delimiter: ", ", name_field: :name
|
147
|
+
klass ||= key.to_s.classify.constantize
|
147
148
|
field key do |names|
|
148
149
|
names.split(delimiter).map do |name|
|
149
150
|
klass.find_by!(name_field => name)
|
@@ -152,6 +153,7 @@ module Chop
|
|
152
153
|
end
|
153
154
|
|
154
155
|
def has_one key, klass=nil, name_field: :name
|
156
|
+
klass ||= key.to_s.classify.constantize
|
155
157
|
field key do |name|
|
156
158
|
klass.find_by!(name_field => name) if name.present?
|
157
159
|
end
|
data/lib/chop/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: chop
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.24.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Micah Geisel
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -141,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
|
145
|
-
rubygems_version: 2.6.14
|
144
|
+
rubygems_version: 3.0.4
|
146
145
|
signing_key:
|
147
146
|
specification_version: 4
|
148
147
|
summary: Slice and dice your cucumber tables with ease!
|