Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# routes.rb
get '/missing_keys', :to => 'home#missing_keys'
# home_controller.rb
def missing_keys
finder = MissingKeys.new(I18n.backend)
@all_keys = finder.all_keys
@missing_keys = finder.find_missing_keys
@found_keys = @all_keys.collect { |key| key unless @missing_keys.keys.include?(key) }.compact
# Reset locale.
set_locale()
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment