cristianbgp / fakeflix-base

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fakeflix

This is the base project of Fakeflix.

Steps to run the app

bundle install
rails db:setup

Steps to recreate the app:

Generate new project

$ rails new fakeflix --database=postgresql --skip-test --api

Generate the model Movie

$ rails g model Movie title:string description:text rating:integer duration:integer price:integer

Generate the model Serie

$ rails g model Serie title:string description:text rating:integer price:integer

Generate the model Episode

$ rails g model Episode title:string description:text duration:integer serie:references

Generate the model Rental

$ rails g model Rental paid_price:integer rentable:references{polymorphic}:index

Create the database

$ rake db:create

Run the migrations

$ rake db:migrate

About


Languages

Language:Ruby 99.5%Language:HTML 0.5%