TranslatesQueryKeys =================== Route configuration and request dispatching extension to allow the translation of query keys. Useful for building routes that recognize legacy URLs, and for obfuscating the implementation details of a rails application behind shorter query parameter key names. This plugin hooks into both URL Generation, and Route Recognition meaning you can refer to your variable names exclusively as the untranslated name, and the plugin will handle everything for you as long as you configure correctly in routes.rb EXAMPLE: ################# ### in a view ### ################# <%= link_to :controller => 'search', :action => 'search', :search_query => 'Pizza Hut', :language => 'en' %> ################# ### routes.rb ### ################# ActionController::Routing::Routes.draw do |map| # Our old application accepted URLs like this. We refer to the parameters # as :page and :sort in our new app, the old URLs will have 'p' and 's' map.connect 'legacy_url/action.jsp', :controller => 'legacy', :action => 'action', :translates => {:p => :page, :s => :sort} # we want urls like: http://example.com/search?q=Pizza+Hut&l=en map.connect 'search', :controller => 'search', :action => 'search', :translates => {:q => :search_query, :l => :language} end ############################ ### search_controller.rb ### ############################ class SomeController < ApplicationController def search @search_query = params[:search_query] # "Pizza Hut" @language = params[:language] # "en" end end