/blog-rails-app

The Blog app will be a classic example of a blog website. It will be a fully functional website that will show the list of posts and empower readers to interact with them by adding comments and liking posts.

Primary LanguageRuby

Ruby on Rails blog

Blog app - validations, model specs, and n+1 problems

form

In this project, I add validations to the models, create specs for them, and find and fix N+1 queries problems.

Getting Started

To get a local copy up and running follow these simple example steps.

Prerequisites

  • Ruby
  • Rails
  • PostgreSQL
  • rspec-rails

Setup

  • Make sure you have Ruby IRB installed on your computer
  • Clone or download this repo on your machine
  • Enter project directory

Install

bundle install

Database

# Create user
sudo -u postgres createuser blog -s

# Create the database
rake db:create

# Load the schema
rails db:schema:load

## Apply migration (only if you generate a new migration file)
rails db:migrate

Run

rails s

Author

👤 Ntazama Willy

🤝 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

  • Hat tip to anyone whose code was used