Code Monkey home page Code Monkey logo

micro-reddit's Introduction

๐Ÿ‘ฝ Building with ActiveRecord - Micro-Reddit

This project is part of a series of projects to be completed by students of Microverse.

This project aims at honing our new knowledge in ActiveRecord for Ruby on Rails, with a specific focus on the model for users, posts and comments.

๐Ÿฅ… The Project Brief

The specifications and the guide to the project can be found The Odin Project's 'Project 2: Micro-Reddit' page.

This project requires the heavy use of the rails console, through which we build three main models - users, posts and comments. Following the creation of the models, they are then modified to allow for validations and the relevant associations (i.e. comments belong to users). Finally, content is added to the database in the form of two users and a few comments to demonstrate working validations and associations.

โš—๏ธ Technologies & Languages Used

  • Ruby 2.6.5
  • Ruby on Rails 6.0.2.1
  • Rubocop 0.79.0
  • Stickler CI

๐Ÿ“Œ Setup & Usage

Setup

Using this project should be fairly straight forward. There are however some prerequisites for your system in order to run this program:

  • You must have Ruby installed. Don't know if you have it installed or how to install it? Follow this guide

  • You must have the Ruby on Rails gem installed. To install, simply run gem install rails in your terminal or enter rails -v to verify if it is installed already. Need help? Head here.

  • Once you have the above sorted, cd into this repository's directory and enter the following into your terminal:

     bundle install
    
  • Check that the previous step completed without any major errors and you should be good to go!

Usage

As this project is short, there are only a few commands you can run to modify and play with it:

  • User.all - Shows all the users currently in the database
  • Post.all - Shows all the posts currently in the database
  • Comment.all - Shows all the comments

You can create a new instance of either posts, users or comments using the following syntax on your command line:

  • User.new(name: '........' , email: '........')
  • Comment.new(author: '........' , comment: '.........')
  • Post.new(title: '........' , body: '........')

๐ŸŽ‚ Contributions, Issues & Forking

If you have any issues setting up the project or you come across any unintended bugs or problems, please do submit an issue to the Micro-Reddit page.

If you want to make your own changes, modifications or improvements to our project, go ahead and Fork it!

  1. Fork it
  2. Create your working branch (git checkout -b [choose-a-name])
  3. Commit your changes (git commit -am 'what this commit will fix/add/improve')
  4. Push to the branch (git push origin [chosen-name])
  5. Create a new Pull Request

๐Ÿ‘จ๐Ÿฝโ€๐Ÿ’ป ๐Ÿ’‚๐Ÿฝโ€โ™‚๏ธ Creators

Qoosim AbdulGhaniyy - Github

Rory Hellier - GitHub

๐Ÿพ Show Your Support

Give a โญ๏ธ if you like this project!

micro-reddit's People

Contributors

dependabot[bot] avatar qoosim avatar rhelli avatar stickler-ci avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

d-e-f-e-a-t

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.