Search code examples
ruby-on-railsrubyruby-on-rails-3rails-routing

Do I need a slash in front of rails route


I have the following url structure in rails routes:

match '/financial-dictionary/:letter' => 'learning_center#dictionary', :as => :lc_dictionary

Do i need a leading slash in front of "financial-dictionary"? What will happen if i remove it?


Solution

  • Short answer: nope, you don't need.

    You might want to read http://guides.rubyonrails.org/routing.html :)