Skip to content

AlexRS90/blog-app

Repository files navigation

Blog App

Milestone 1:

✅ Created a new rails app.
✅ Followed gitflow
✅ Setup PostgreSQL database.
✅ For each URL I created:

  • A route.
  • Action in the correct controller.
  • A view file.

Milestone 2:

✅ Add RSpec as a gem to your project.
✅ Create a Request spec file for all your controllers.
✅ Make sure that for each action you check:

  • If the response status was correct.
  • If a correct template was rendered.
  • If the response body includes correct placeholder text.

Milestone 3:

✅ Wrote commands to create new models and their migrations.
✅ Wrote commands to generate schema.rb
✅ Added foreign keys with their indexes.

Milestone 4:

✅ Added some records to the database. ✍️
✅ Wrote some methods to update the database counters. 🔢
✅ Used seeds.rb and rails console. 🌱

Milestone 5:

✅ Implemented the design from the sneak peek wireframes. 🖥️
✅ Added basic styling 🎨
✅ Used methods from models. 📈
✅ Used partials to keep the code DRY 🏜️

Milestone 6:

✅ Create forms to perform the following functions:
✔️ Creates a Post on behalf of the current_user. 📄
✔️ Create a comment on behalf of the current_user. ✍️
✅ Allow Users to add likes to Posts. 👍

Milestone 7:

✅ Added the following validations:
✔️ For the User model:
☑️ Name must not be blank.
☑️ PostsCounter must be an integer greater than or equal to zero.
✔️ For the Post model:
☑️ Title must not be blank.
☑️ Title must not exceed 250 characters.
☑️ CommentsCounter must be an integer greater than or equal to zero.
☑️ LikesCounter must be an integer greater than or equal to zero.
✅ Added unit specs for all of your models' methods and validations.
✅ Added flash messages in the create actions in all your controllers.
✅ Solved issue N+1 using Bullet gem

Milestone 8:

✅ Added some styling to improve the UI 🎨
✅ Installed devise gem 💎
✅ User is able to:
✅ Can register a new user. 🧑‍💻
✅ User logs in with a combination of email and password. 🔑 📫
✅ Hashed passwords should be stored in the database. 🗝️
✅ Ask for confirmation of email. 📩
✅ Can reset password. 🔑 ▶️ 🗝️

Milestone 9:

For this PR I tested some functionalities of the app using RSpec and Capybara.
✅ Login page 👨‍💻
✅ User index page 📄
✅ User show page 💻
✅ User post index page ✍️ ⌨️
✅ Post-show page 🖥️ 📃

Built With

  • Ruby On Rails

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

Open your termnial and run the following command:

git clone https://github.com/AlexRS90/blog-app.git

  • cd blog-app
  • bundle
  • rails db:create
  • rails db: migrate
  • rails s

Open your browser and type the following URL http://127.0.0.1:3000/

Finally you can start using the app and add some post, comments and likes. Enjoy!

Here are some data to add to the database from the rails console, in case you need them:

Testing

To run the unit test once you did the above steps just write the following command in your terminal, you must be on your root directory:

  • rspec spec

Prerequisites

  • Ruby
  • Terminal

Author

👤 Alejandro Ramos

👤 Mateo Villagómez

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Show your support

Give a ⭐️ if you like this project!

📝 License

This project is MIT licensed.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published