create_custom_attributes 0.5.5 → 0.5.6
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: d86d6f94aede20a07b0d613605bb2bd174e7b055
|
4
|
+
data.tar.gz: 369e39943065c415c575019308aa4159287334e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 437e7c2da35085e0b39d7fd851595ffb7beac2e5d6d450f0f7bb8d3364591af0525bb16739d54d4eaaf0b5a2707e49f4faab98d18edd39aefe2da27c34f9b02a
|
7
|
+
data.tar.gz: 5cc1238b3aa2443051f92d4a41ae67fb6455363e3c65abe8a12300f52ec118b42f93e416006428ff1ef22970079be50ed39f8202f7e02ab17aecf3fa80133a94
|
@@ -119,7 +119,7 @@ module CustomAttributes
|
|
119
119
|
def populate_custom_field_value(field)
|
120
120
|
x = CustomAttributes::CustomFieldValue.new
|
121
121
|
x.custom_field = field
|
122
|
-
x.customizable =
|
122
|
+
x.customizable = course
|
123
123
|
if field.multiple?
|
124
124
|
values = custom_values.select { |v| v.custom_field == field }
|
125
125
|
if values.empty?
|
@@ -128,7 +128,7 @@ module CustomAttributes
|
|
128
128
|
x.instance_variable_set('@value', values.map(&:value))
|
129
129
|
else
|
130
130
|
cv = custom_values.detect { |v| v.custom_field == field }
|
131
|
-
cv ||= custom_values.build(customizable:
|
131
|
+
cv ||= custom_values.build(customizable: course, custom_field: field)
|
132
132
|
x.instance_variable_set('@value', cv.value)
|
133
133
|
end
|
134
134
|
x.value_was = x.value.dup if x.value
|