Dynamic Routing
2 min readOct 7, 2020
TEST: Route to a view.. has an index page

CODE:resources

SPEC FILE:
describe 'Route to view' do
it 'has an index page' do
visit "/students"
get “students/:id”, to: “students#show”
* Use a routes variable in params within the logic of an action




* Assign an instance variable in a controller action

* Use a controller instance variable to generate a dynamic ERB template.
* Build a classical show action/view