|
|
@ -30,9 +30,11 @@ |
|
|
|
class CustomValue::VersionStrategy < CustomValue::FormatStrategy |
|
|
|
class CustomValue::VersionStrategy < CustomValue::FormatStrategy |
|
|
|
def typed_value |
|
|
|
def typed_value |
|
|
|
unless value.blank? |
|
|
|
unless value.blank? |
|
|
|
|
|
|
|
RequestStore.fetch(:"version_custom_value_#{value}") do |
|
|
|
Version.find_by(id: value) |
|
|
|
Version.find_by(id: value) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
def validate_type_of_value |
|
|
|
def validate_type_of_value |
|
|
|
unless custom_field.possible_values(custom_value.customized).include?(value) |
|
|
|
unless custom_field.possible_values(custom_value.customized).include?(value) |
|
|
|