1
I created two models in the Rails application, and made their relationship through the declaration in the classes and in the bank as well. I added the configuration to enable nested Resources in the Routes file, the routes were created but do not work the way they should, I will put the example below:
Model Project
has_many :steps
Model Steps
belongs_to :project
resources :projects do
resources :steps
end
However, when I hit the /Projects/1/Steps url it always falls into the index action of the Steps controller, which returns a Steps.all.
The correct way to do this, is just rewriting the same index action??
Boy, got confused... you set the action
index
Steps? Or are you asking if you have to define...– rafaels88