Skip to content

Repository files navigation

VanCamp

Notes

# create rails app (with le wagon minimal rails app template: https://github.com/lewagon/rails-templates#minimal)
rails new \
  --database postgresql \
  --webpack \
  -m https://raw.githubusercontent.com/lewagon/rails-templates/master/minimal.rb \
  VanCamp

# Add to Gemfile (at the end)
gem 'devise'

# install gems
bundle install

# install devise
rails generate devise:install

# manually changed some files. Follow these two instruction slides:
# https://kitt.lewagon.com/karr/lectures/rails/authentication/index.html?title=Authentication#/3/2
# https://kitt.lewagon.com/karr/lectures/rails/authentication/index.html?title=Authentication#/3/3

# generate user model with devise gem
rails generate devise User

# migrate database to create users table
rails db:migrate

# generate vans model with description, location, brand, category, seats, user_id
rails g model van description location brand category seats:integer user:references

# create database
rails db:create

# migrate database
rails db:migrate

# generating a booking model w/ attributes van_id, user_id. checkin, checkout.
rails g model booking van:references user:references checkin:date checkout:date



Rails app generated with lewagon/rails-templates, created by the Le Wagon coding bootcamp team.

About

Rent a Van

Resources

Stars

3 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages