This app is intended to be a simple server of a CRUD app built with Ruby on Rails.
- Rails v6.1.7
- Ruby v2.7.2
- Database postgreSQL
- Bundle v2.1.4
- create
.env
, you can check.env.example
- run
bundle install
- run
rails db:create rails db:migrate
- run
rails s
- for testing purposes, you can go to
application_controller.rb
and make@current_user = User.find(1)
Method | URL | Explanation |
---|---|---|
POST | /conversations | Create conversation with desired title |
GET | /conversations | Get all conversations that the authenticated user has |
GET | /conversations/:id | Get conversation by id |
PUT/PATCH | /conversations/:id | Update conversation by id |
DELETE | /conversations/:id | Delete conversation by id |
Method | URL | Explanation |
---|---|---|
POST | /messages | Create message to other user |
- gem "faker"
- gem "dotenv-rails"
- gem "fast_jsonapi"
- gem "composite_primary_keys"
The challenge is make sure when you run bundle exec rspec
, all result is green (without error):)
Create conversation
Get conversations
Get conversation by id
Update conversation by id
Delete conversation by id
Create message
2024 © Muhammad Bangkit. All Rights Reserved.