Members Only
This is a simple forum where only signed in users can see the details of fellow members or authors.
Overview
In this project, authentication has been implemented for members of the forum using the Devise
ruby gem. The Member
model is used to create the members of the forum, while the Post
model is used to create a post which must be linked to a Member
through it's member_id
field, a post object also has title
and body
fields.
This is the simple representation of the Association between the Member
, Post
, and Comment
models
class Member < ApplicationRecord
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :validatable
has_many :posts
end
class Post < ApplicationRecord
belongs_to :member
end
class Comment < ApplicationRecord
belongs_to :post
belongs_to :member
end
Live Demo
Checkout the live demo at Live
Built With
- Rails
- Bootstrap 5
- HTML
- CSS (SCSS)
- Database (SQLite3)
Getting Started
To run the project in your local machine follow this step by step instruction:
- Open your terminal and run
git clone git@github.com:cyonii/members-only.git
- Once the repo is cloned, navigate into it's directory with
cd members-only
- Run
bundle install
to install dependencies - Run
yarn install
- Run
rails db:migrate
- After your run the previous operations, run
rails server
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page.
Show your support
Give a
Authors
- GitHub: @cyonii
- Twitter: @theOnuoha