lib/ab_admin/models/locator.rb in ab_admin-0.6.1 vs lib/ab_admin/models/locator.rb in ab_admin-0.7.0
- old
+ new
@@ -14,10 +14,11 @@
def find_files
Dir[Rails.root.join('config', 'locales', '*.yml')]
end
def save(path, data)
+ data.deep_transform_values! { |v| AbAdmin.normalize_html(v) }
File.write path, data.deep_stringify_keys.to_yaml.sub(/\A---\s+/, '').gsub(/:\s+$/, ':').gsub(/^(\s+)(yes|no):/, '\1"\2":')
end
def prepare_data(path)
data = YAML.load_file(path)
@@ -63,9 +64,8 @@
end
end
end
{message: message}
end
-
end
end
end
\ No newline at end of file