Skip to content

Commit

Permalink
Revised yaml_value helper so that it doesn’t apply any special format…
Browse files Browse the repository at this point in the history
…ting to blank values.
  • Loading branch information
Craig Davey committed Apr 22, 2010
1 parent d2e11dd commit ca7eb2e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/helpers/tolk/application_helper.rb
Expand Up @@ -9,10 +9,12 @@ def format_i18n_text_area_value(value)
end

def yaml_value(value)
unless value.is_a?(String)
value = value.respond_to?(:ya2yaml) ? value.ya2yaml(:syck_compatible => true) : value.to_yaml
if value.present?
unless value.is_a?(String)
value = value.respond_to?(:ya2yaml) ? value.ya2yaml(:syck_compatible => true) : value.to_yaml
end
end

value
end

Expand Down

0 comments on commit ca7eb2e

Please sign in to comment.