lib/ab_admin/models/locator.rb in ab_admin-0.2.3 vs lib/ab_admin/models/locator.rb in ab_admin-0.3.0

- old
+ new

@@ -22,12 +22,12 @@ end def prepare_data(path) data = YAML.load_file(path) locale = data.keys.first - OpenStruct.new({:locale => locale.to_sym, :data => data[locale], :flat_data => flat_hash(data[locale]), - :filename => File.basename(path), :path => path, :dir => File.dirname(path)}) + OpenStruct.new({locale: locale.to_sym, data: data[locale], flat_data: flat_hash(data[locale]), + filename: File.basename(path), path: path, dir: File.dirname(path)}) end def flat_hash(hash, k = []) return {k => hash} unless hash.is_a?(Hash) hash.inject({}) { |h, v| h.merge! flat_hash(v[-1], k + [v[0]]) } @@ -63,10 +63,10 @@ self.class.save(path, {locale.to_s => clean_locale_hash}) message = 'Reload application to pick up new locale files' end end end - {:message => message} + {message: message} end end end end \ No newline at end of file