We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3638dc0 commit f08a24dCopy full SHA for f08a24d
config/routes.rb
@@ -2,5 +2,5 @@
2
3
Rails.application.routes.draw do
4
# get '/articles', to: 'articles#index'
5
- resources :articles, only: [:index]
+ resources :articles, only: %i[index show]
6
end
spec/routing/articles_spec.rb
@@ -12,4 +12,8 @@
12
)
13
14
15
+
16
+ it 'routes to articles#show' do
17
+ expect(get('/articles/1')).to route_to('articles#show', id: '1')
18
+ end
19
0 commit comments