views:

32

answers:

1

Could someone describe what this is all about?

It's in the routing file:

match "photo", :constraints => {:subdomain => "admin"}

I can't understand it.

thanks

+1  A: 

It's saying that the photo route will only be recognised and routed to a controller if the request contains the subdomain admin. For example, the Rails application would respond to a request of http://admin.example.org/photo, but not http://example.org/photo.

John Topley
ok thanks. but which controller and index will this route use?
never_had_a_name
Whichever you want. For example: `match 'photo' => 'photos#show', :constraints => { :subdomain => 'admin' }`
John Topley
but in the routing i posted there is no controller and action specified?
never_had_a_name
I think it's a poor example in the guide.
John Topley
@John Topley. could i ask you how you saw my reply? did you get an instant notification when i made a new comment? cause i get no notifications when users are posting replies to my comments.
never_had_a_name
I didn't get an instant notification, but I was looking at this question and saw that you'd replied.
John Topley