Skip to content

Repository files navigation

Crazy 4 Cats!

Blog web app for a cat lover who wants to share his cat adventures with the world, built with Ruby on Rails.

Description

Blog web app with a fully functioning user authentication system set up using Devise. There are 2 roles available: User, who can create articles and comments and Admin, who can also edit and delete them. Guests can view articles and leave anonymous comments in them. All registered users can also like or dislike the articles (or remove their reaction if they chose to).

Views

Index

Index

Article

Article

Admin permissions

Article

Comments

Comments

Log in

Log in

Edit user

Edit user

Placeholder images from LoremFlickr 🐱

Deploy on Heroku via CLI

  • Log in using heroku login
  • Create app using heroku create
  • Connect to app using heroku git:remote -a app_name
  • Upload app using git push heroku main
  • Run migrations using heroku run rails db:migrate
  • Create or update an admin account:
    • Launch a Rails console with heroku run rails console
    • Create an Admin account with User.create(email:"your@email.com", password:"your_password", username:"your_username", role:"admin")
    • Or modify an existing account with the following commands
      admin = User.find(your_user_id)
      admin.role = "admin"
      admin.save

Software used

Gems

Possible improvements

  • Article search with PgSearch
  • Pagination with Pagy
  • Role permission tests
  • Mailer setup with the help of Figaro to configure environment variables
  • Icons for reactions

About

Desafío - Relaciones N a N en los modelos

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages