/all-versions

Ruby on Rails project using the PaperTrail gem where we can see the customer's versions. We can view and revert a version, as well as restore a deleted customer.

Primary LanguageRuby

All Versions


Ruby on Rails project using the PaperTrail gem where we can see the customer's versions. We can view and revert a version, as well as restore a deleted customer.

Ruby Version

Screenshot

  • Index with all customers and show - creating a customer

  • Editing a customer - deleting a customer

  • View all customer versions - details page - revert version

  • See all deleted customers - restore customer

Stack the Project

  • Ruby on Rails
  • Bootstrap
  • Sqlite3
  • Rspec
  • Docker

Tests

Building application

First you must have:

  1. Ruby >= 3.0.1 installed.

As soon as you have everything done you can follow

Run Project

Clone the project

  git clone https://github.com/RaquelLima7/second-challange.git

Go to the project directory

  cd second-challange

1. Building everything

If you want to rock and create your dev environment and data, it's possible to go through the usual way:

  1. And to bundle it with command:
bundle install
  1. Create databases
rails db:create
  1. Run migrations
rails db:migrate
  1. If you prefer, you can populate the database with the command:
rails db:seed
  1. Run tests
rspec

2. Building everything with docker

If you want to use Docker to create your development and data environment, you can follow the path below.

Necessary documentation:

  1. Building the project
docker-compose build
  1. Start the application
docker-compose up
  1. Create database
docker-compose run web rails db:create
  1. Run migrations
docker-compose run web rails db:migrate
  1. If you prefer, you can populate the database with the command:
docker-compose run web rails db:seed
  1. Run tests
docker-compose run web rspec