Code Monkey home page Code Monkey logo

relational_rails's Introduction

README

About:

An introductory project to databases, active record and the Ruby on Rails framework. A database was established for use during the project. See Database Schema below for more info on its design. We then implemented the MVC (Model - View - Controller) design pattern of Rails with RESTful routing principles to allow users to create, read, update and delete (CRUD) resources to and from the database. Class and instance methods on a Rails model use ActiveRecord methods and helpers to access data. All line of code have been tested for accurate functionality.

Built With:

This repository was built using Ruby v2.7.2 and Rails 5.2.6.

  • Gems Used:
  • RSpec
  • Pry
  • SimpleCov
  • Capybara
  • Launchy
  • Shoulda-Matchers v5.0
  • Orderly

How to Use:

Downloading the Repo and Setup:
  • Fork this Repo (optional)
  • Clone the Repo
  • In your terminal run the following:
    • git clone <paste_repo>
    • cd <repo_name>
    • bundle install
    • rails db:{drop, create, migrate, seed}
Viewing the App:
  • From your CLI enter the following command
    • rails server
  • Navigate to your web browser and visit one of the following pages:
    • localhost:3000/producers
    • localhost:3000/producers/1
    • localhost:3000/producers/1/discs
    • localhost:3000/discs
    • localhost:3000/discs/1
    • localhost:3000/directors
    • localhost:3000/directors/1
    • localhost:3000/directors/1/movies
    • localhost:3000/movies
    • localhost:3000/movies/1

Database Schema

Our database was designed with 2 separate one-to-many relationships established. They only interact in the one-to-many context as illustrated in the image below. Each uses a minimum of 1 string, boolean and integer datatype for practice in accessing varying types of data.
image

Testing:

Tests can be run using the following command into your CLI:

  • rspec spec/<file_name> to run the tests on a particular spec file
  • bundle exec rspec to run all files.

SimpleCov has been used to verify coverage. A Simplecov report can be viewed by entering following into your CLI:

  • open coverage/index.html

Authors:

relational_rails's People

Contributors

conorbarthel avatar lisataylor5472 avatar

Watchers

 avatar

Forkers

lisataylor5472

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.