Permalink
Browse files

Refactor ApplicationHelper#tolk_locale_selection

  • Loading branch information...
lifo committed May 8, 2010
1 parent a4dee96 commit 2507d84445b3a3551c017e4590b5346108d8198e
Showing with 3 additions and 6 deletions.
  1. +3 −6 app/helpers/tolk/application_helper.rb
@@ -18,14 +18,11 @@ def yaml_value(value)
value
end
-
def tolk_locale_selection
existing_locale_names = Tolk::Locale.all.map(&:name)
- pairs = Tolk::Locale::MAPPING.to_a.map(&:reverse)
- pairs = pairs.sort_by(&:first)
- pairs.reject do |pair|
- existing_locale_names.include? pair.last
- end
+
+ pairs = Tolk::Locale::MAPPING.to_a.map(&:reverse).sort_by(&:first)
+ pairs.reject {|pair| existing_locale_names.include?(pair.last) }
end
end
end

0 comments on commit 2507d84

Please sign in to comment.