ylaifa / reliev

1 stars 1 forks source link

Company Profile #46

Closed billzero closed 2 years ago

billzero commented 4 years ago

Why ?

To get a complete set of informations about the Company.

How ?

Create the model

go to the migration file generated by this command

Go to the model file company_profile.rb and write the following code :

Testing the model in console (we need the other following models to be created before these tests : Company, Masseur, MasseurProfile, Employee, EmployeeProfile). Testing link to Company devise model :

run rails console --sandbox and create a company : Company.create(email: "test@example.com", password: "123456", password_confirmation: "123456"). Then test the CompanyProfile creation : take the ID of the last created company Company.last, and next, CompanyProfile.create(company_id: the_id_of_the_last_created, name: "test", authorized: true)

Controller

Views

Must Have

Reading List