Skip to content

Created as part of the App Academy Bootcamp ruby-on-rails Exercise

Notifications You must be signed in to change notification settings

YatootaY/leave-a-note

Repository files navigation

Leave a note website

Welcome to the free world

  • A website that allow you to leave notes and comments anonymously.

How to access the website

Through the heroku webstie

Go to the website Here

In your local machine

  1. First, clone this repo to your local mechine with git command.
  • git clone https://github.com/YatoAki/leave-a-note
  1. Go to the cloned source code dictionary.
  • cd ./leave-a-note
  1. Install the required gems
  • bundle install
  1. Migrate the database
  • rails db:migrate
  1. Seed the database (Optional)
  • rails db:seed
  1. Run the rails server
  • rails server
  1. Go to http://localhost:3000/ in your broswer

Website architecture

Model

Article - article.rb

  • Title, body, status
  • has many comments

Comment - comment.rb

  • Commenter, body
  • belong to article

Controller

ArticlesController - articles_controller.rb

  • index, show, new, create, edit, update, destroy

CommentsController - comments_controller.rb

  • create, destroy

Authentication

  • Edit & Destroy method can only be accessed by Admin