I am new to Ruby on Rails and have some problems.
For the development I use RubyMine IDE, I manage to create models, controllers and views, but I have problems with the routing. By default, routes.rb
file contains only this method Apis::Application.routes.draw do
with an empty body.
For example, I create a controller TestController
, then the index
method and in routes.rb
I add this instruction resources :test
. So far, it works fine. But if I add another method, let's say method1
(and the view) I can't reach it in a browser http://localhost:3000/test/method1
.
What else should I add in routes.rb
file?
Is there any way to make the routing automatically from the IDE, with less editing the routes file?