enriclluelles/route_translator — pull request #63 by omnikron (2014-07-16 18:11:39+00:00)
Title: Host locales path helpers fix + refactoring

@gi-lunaweb unfortunately I introduced a bug in my last PR (the bug only occurs when using the `host_locales` option). The path helpers were incorrectly returning `nil` when given anything other than a hash as an argument. This PR fixes the bug and adds a test for it.

While I was there I did some refactoring of the `add_untranslated_helpers_to_controllers_and_views` method to make it a bit more readable, as there was some unnecessary repetition of `__send__` etc. If you don't like this change then I can also resubmit this PR with just the fix above.

I also moved `locale_param_key` back to `lib/route_translator.rb`, I had moved this to `lib/route_translator/host.rb` but I think it makes more sense in its original position.