Skip to content

ashraffares/micro-reddit

Repository files navigation

Active-record

Capture1 Capture2

Description

This program implements a basic active record action in ruby on rails with three model classes and assoications between these models

  • Author model: The author model implements four validation for the authors table: - Presence of all fields when adding an author - Username must be unique and length between 4 - 12 - Password must of length between 6 - 16 - email must be unique

  • Post model: The post model implements a validation for the posts table: - Presence of all fields when adding a post

  • Comment model: The post model implements a validation for the comment table: - Presence of all fields when adding a post

Association

Program implements 2 main association: Has_many and the belongs_to

Has_many

  • A post has many comments
  • An author has many posts
  • An author has many comments

Belongs_to

  • A post belongs to an Auhtor
  • A comment belongs to a post

Additional description about the project and its features.

Built With

  • Ruby on Rails

Author1

Author2

Getting Started

To get a local copy of the repository please run the following commands on your terminal:

Show your support

Give a ⭐️ if you like this project!!

About

This program implements a basic active record action in ruby on rails with three model classes and assoications between these models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors