GithubHelp home page GithubHelp logo

micro_reddit's Introduction

Micro-reddit Project

The aim of this project is practicing what we have learned about Active Record, Migrations, Associations and Validations. We have created the back-end of a blog in which you can:

  • Create an author's username, email and password;
  • Create author's posts which have a body and a title;
  • Add comments to the posts created, witch body and title.

Built With

  • Ruby on Rails version 6.0

Prerequisites

  • Browser (Google Chrome, Mozilla Firefox, Safari or any other browser)
  • Ruby and Ruby on Rails installed in your machine
  • SQLite installed in your machine

Table Schema

For the model to work properly, the associations needed to be applied as follows: screenshot

Getting Started

Open Terminal
run git clone [email protected]:abouhid/Micro_reddit.git
run cd Micro-reddit
run rake db:migrate
run rails c
  • In the console you are able to create the authors,posts and comments, alongisde with its features, as follows on the example:
author1 = Author.create(username:'test_name', email: '[email protected]', password: 'example')
post1 = author1.posts.new
post1.title = 'Example title'
post1.body = '50 characters are necessary for this body to be accepted by the validations applied to this post model'
post1.save
comment1 = post1.comments.new
comment1.comment_title = 'test comment title'
comment1.comment_body = 'test comment body'
comment1.save
  • You can check the records created by typing
Author.all
Post.all
Comment.all

Authors

๐Ÿ‘ค Alexandre Bouhid

๐Ÿ‘ค Kelyn Paul Njeri

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

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

Acknowledgments

  • Microverse
  • GitHub
  • TheOdinProject
  • Ruby

๐Ÿ“ License

This project is MIT licensed.

micro_reddit's People

Contributors

thealchemistke avatar

Stargazers

Eduardo Bouhid Neto avatar

Watchers

James Cloos avatar Alexandre Bouhid avatar

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.