LoginSignup
10
9

More than 5 years have passed since last update.

Routingのテストをする

Last updated at Posted at 2012-12-26

適当にテストしたいとき,rails consoleで以下のように試せる

> r = Qiita::Application.routes
> r.recognize_path '/items'
=> {:action=>"index", :controller=>"items"} 
> r.recognize_path '/items', method: :post
=> {:action=>"create", :controller=>"items"}

また確認は http://localhost:3000/rails/info/routes にアクセスすると良い
via View your Routes without waiting on Rake by schneems · Pull Request #6461 · rails/rails

10
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
9