views:

35

answers:

1

I would like to do the following

      match "company/client-list" => 'companies#list'

however, when I do, my routes table entry doesn't name the route, like so.

    /company/client-list(.:format) {:controller=>"companies", :action=>"list"}

as soon as I remove the hyphen in the matched route, it behaves as expected

    company_clientlist /company/clientlist(.:format) {:controller=>"companies", :action=>"list"}

Anyone have any ideas how to include hyphens in my matched routes?

A: 

And I have the answer:

match 'company/client-list' => 'companies#list', :as => 'client_list'

This makes the following entry in my routes table

client_list /company/client-list(.:format) {:controller=>"companies", :action=>"list"}

Go Team!

kayluhb