Table of Content
Creating gallery home page
Let’s start styling the home page.
First we need a generic pages controller for the index page.
- Remove the
public/index.html
file. - generate the “pages” controller with
$ rails generate controller pages index
And the routes.rb
file.
PhotoGallery::Application.routes.draw do
resources :albums do
resources :photos
end
root :to => 'pages#index'
end
After that, we get a temporary index page.
What’s next? We’re going to take a look at “Adding swipejs library”.