This is a very basic setup of a Sinatra app, that already has a model example.
To get started run the following commands:
bundle install
Run migrations to update database schema:
bundle exec rake db:migrate
To run the app use shotgun,
which means you can run just by typing shotgun
.
Add some dummy data to your application. Run tux
and paste the following code:
Video.create(
title: 'Fight Club',
year: 1999,
director: 'David Fincher'
)
Video.create(
title: 'City of God',
year: 2002,
director: 'Fernando Meirelles, Kátia Lund'
)
Video.create(
title: 'The Prestige',
year: 2006,
director: 'Christopher Nolan'
)
Remember to use flash messages to inform the user if the action was a success or error.
The order buttons on the index page don't work. Make them work.
Create a page to show the details of the video. Like the director.
Create a page to edit a video and submit the changes.
Create a page to create a new video.
Implement the route of removing a video.