Project

General

Profile

« Previous | Next » 

Revision 0accaa2d

Added by Stephen Benjamin about 10 years ago

fixes #4639 - array in lookup_value incorrectly displayed in form

(cherry picked from commit 801a90d196d363aadae7bf2be9347ff6e46e0471)

View differences:

app/models/lookup_key.rb
def value_before_type_cast val
case key_type.to_sym
when :json
when :json, :array
val = JSON.dump val
when :yaml, :hash
val = YAML.dump val
val.sub!(/\A---\s*$\n/, '')
when :array
val = val.inspect
end unless key_type.blank?
val
end

Also available in: Unified diff