In this project we created the model part of our rails webpage using active records commands.
- Ruby on Rails
- VsCode
- Active Records
To get a local copy up and running follow these simple example steps:
- Clone this repository into your local machine.
- Run the main file by typing this in your command line:
$ rails console
$ u = User.new(username: 'Admin', email: '[email protected]', password: '123456') #This is to create a User
$ p = Post.new(title:'new title', body: 'New body', user_id: 1) #This is to create a post by a certain user
$ c = Comment.new(body: 'New body', user_id: 1, post_id: 1) #This is to create a comment by the user
$ u.save
$ p.save
$ c.save
$ u #To check the user content
$ p #To check the post content
$ c #To check the comment content
- Rubocop
- Stickler
π€ Elias CastaΓ±eda
π€ Abdulaziz Ali
- Github: @abredi
- Twitter: @rediabdulaziz
- Linkedin: linkedin
Contributions, issues and feature requests are welcome!
Feel free to check the issues page.
Give a βοΈ if you like this project!
This project is MIT licensed.