Permalink
Browse files

Revised yaml_value helper so that it doesn’t apply any special format…

…ting to blank values.
  • Loading branch information...
1 parent d2e11dd commit ca7eb2e3aa576261967847b6c6b9b335e0293918 Craig Davey committed Apr 22, 2010
Showing with 5 additions and 3 deletions.
  1. +5 −3 app/helpers/tolk/application_helper.rb
@@ -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

0 comments on commit ca7eb2e

Please sign in to comment.