The project aims to provide a deeper understanding on model in active record by building a Micro-Reddit app. Associations are very simple and illustrated below:
- User owns Posts & Comments
- Post has to belong to a User & Post can have many Comments
- Comments must belong to a Post & a User
- Ruby on Rails
Model generated:
- user
- comment
- post
-
- Ruby (~v2.6.3 or more recent) installed in your machine.
-
- Rails
- To clone this repository, open your Terminal and execute the following command:
git clone https://github.com/smy5152/micro-reddit.git
- Change into the folder
cd micro-reddit
- Install gems
bundle install
- Run Database migrations
rails db:migrate
- Run Rails console
rails console
To start testing the models, execute the following commands from the Rails console. We have added some default content in each Model.
- User.all
- Post.all
- Comments.all
🧑💻 Shabbir
- GitHub: @smy5152
- Twitter: @smy5152
- LinkedIn: Shabbir Yamani
🧑💻 Varun
- GitHub: @Varun2323
- Twitter: @Varun2323
- LinkedIn: Varun Sharma
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.