blog index using page index
This commit is contained in:
parent
a961dce0fa
commit
9fa9739e2d
|
@ -0,0 +1,5 @@
|
|||
## Title
|
||||
|
||||
### Subtitle
|
||||
|
||||
And some text
|
|
@ -0,0 +1,5 @@
|
|||
%h1 Index
|
||||
|
||||
- @pages.each do |title , page|
|
||||
%h3= link_to page.title , blog_page_path(page.title)
|
||||
%p= page.content
|
|
@ -29,5 +29,5 @@ Rails.application.routes.draw do
|
|||
root to: 'high_voltage/pages#show' , id: 'index'
|
||||
|
||||
get "/blog" , to: "blog#index" , as: :blog_index
|
||||
get "/blog/*slug" , to: "blog#page" , as: :blog_page
|
||||
get "/blog/*title" , to: "blog#page" , as: :blog_page
|
||||
end
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
feature 'Blog index' do
|
||||
|
||||
scenario 'index shows' do
|
||||
visit blog_index_url
|
||||
expect(page).to have_content("Index")
|
||||
end
|
||||
|
||||
|
||||
end
|
Loading…
Reference in New Issue