-
Notifications
You must be signed in to change notification settings - Fork 0
Feature2 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature1
Are you sure you want to change the base?
Feature2 #2
Conversation
| @@ -0,0 +1,3 @@ | |||
| class Appt < ApplicationRecord | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Smokashi23 Use proper model name
| class Appt < ApplicationRecord | |
| class Appointment < ApplicationRecord |
| @@ -0,0 +1,4 @@ | |||
| class Role < ApplicationRecord | |||
| has_many :users | |||
| validates :role, inclusion: { in: %w(doctor patient), message: "should be 'doctor' or 'patient'" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
message should be displayed through I18n.t
| adapter: postgresql | ||
| pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> | ||
| timeout: 5000 | ||
| username: postgres |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not push username password changes in database.yml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shubhh139 where to give credentials
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Smokashi23 either credentials.yml.enc file or .env file
| class CreateRoles < ActiveRecord::Migration[7.1] | ||
| def change | ||
| create_table :roles do |t| | ||
| t.string :role_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| t.string :role_name | |
| t.string :name |
Inside Role table, name attribute will itself be self-explanatory
| create_table :appts do |t| | ||
| t.references :user, foreign_key: true, null:false | ||
| t.references :slot, foreign_key: true, null:false | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary space detected
|
|
||
| class SlotTest < ActiveSupport::TestCase | ||
| # test "the truth" do | ||
| # assert true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary file pushed
No description provided.