Rails 3.1 & Routes & Root

I have

Ultradedup002::Application.routes.draw do
match ‘:controller/:action(:id)’
root :to => ‘home#show’
end

Focusing on
root :to => ‘home#show’

how do I add a parameter?
root :to => ‘home#show?locale=en’
does not seem to work.

On Sat, Dec 24, 2011 at 10:38 AM, Ralph S. [email protected]
wrote:

how do I add a parameter?
root :to => ‘home#show?locale=en’
does not seem to work.

root :to => ‘home#show’, :locale => :en

seems to :slight_smile:


Hassan S. ------------------------ [email protected]

twitter: @hassan

That was exactly what I wanted and it works.

Thank you.