create_custom_attributes 0.5.13 → 0.5.14
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82b2f25d17e3ef2765629bedc963acbc6ec9378
|
4
|
+
data.tar.gz: 5d395bcea5b5de1dde9d660be8c1785b8414fd3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f32f954866a102877e87fc7ca7e4a357d3327624f2626e6c9381b13bd766cc348472dc2076891c1728f9d8a62c382dd1a31a3bb53508489aa6be861b1301cca
|
7
|
+
data.tar.gz: 765023bf69179dd28ac30e53381023033c56e2d73656265d22c8519eae060217d145f11e714c69145873bab6ebcb3b89c3b0d0fe5b203c8d99d422d12597c649
|
@@ -164,6 +164,12 @@ module CustomAttributes
|
|
164
164
|
change_position_by(1)
|
165
165
|
end
|
166
166
|
|
167
|
+
def customizable_class
|
168
|
+
model_type.gsub('CustomField', '').constantize
|
169
|
+
rescue NameError
|
170
|
+
false
|
171
|
+
end
|
172
|
+
|
167
173
|
protected
|
168
174
|
|
169
175
|
def set_slug
|
@@ -200,12 +206,6 @@ module CustomAttributes
|
|
200
206
|
new_slug
|
201
207
|
end
|
202
208
|
|
203
|
-
def customizable_class
|
204
|
-
model_type.gsub('CustomField', '').constantize
|
205
|
-
rescue NameError
|
206
|
-
false
|
207
|
-
end
|
208
|
-
|
209
209
|
def ensure_position_integrity
|
210
210
|
expected_position = 1
|
211
211
|
self.class.where(model_type: model_type).order(position: :asc).each do |field|
|