Created
March 2, 2010 20:54
-
-
Save rbarazi/319933 to your computer and use it in GitHub Desktop.
[Beginning Rails 3] Listing 2-4. The config/routes.rb file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hello::Application.routes.draw do |map| | |
match ':controller(/:action(/:id(.:format)))' | |
end |
Hello rbarazi,
I am learning rails and I am using "beginning rails 4 3rd edition". I am sill on the basic "hello world" and at first the code in the book for the routes.rb didn't work. rails server wasn't able to launch. I read the message and I figured out that the error was in the routes.rd file so instead of your code, I inserted the code below:
Rails.application.routes.draw do
get':controller(/:action(/:id(.:format)))'
end
I am on mac I would like know why the ones you provide didnt work.
Thanks
Hi @ansaanch, If you're using Rails 4, you can do the following:
get 'salutation/hello'
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Isso não funciona mais no rails 4. Dá uma olhada nesse link: http://stackoverflow.com/a/19722929/405013