lib/ab_admin/models/locator.rb in ab_admin-0.3.6 vs lib/ab_admin/models/locator.rb in ab_admin-0.4.0

- old
+ new

@@ -14,12 +14,10 @@ def find_files Dir[Rails.root.join('config', 'locales', '*.yml')] end def save(path, data) - File.open(path, 'w') do |file| - file.write data.ya2yaml.sub(/\A---\s+/, '').gsub(/:\s+$/, ':').gsub(/^(\s+)(yes|no):/, '\1"\2":') - end + 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) locale = data.keys.first \ No newline at end of file