Open ylaifa opened 4 years ago
Why ?
To allow employees to have a massage.
Todo
Model
[x] $ rails g model Event title:string description:text masseur:string participating_employees:string moment:string maximum_number_of_participation:interger
$ rails g model Event title:string description:text masseur:string participating_employees:string moment:string maximum_number_of_participation:interger
[x] add to migration :
t.belongs_to :company, index: true
t.string :participating_employees, array: true, default: []
[x] $ rails g migration AddCityToCompanyProfiles city:string
$ rails g migration AddCityToCompanyProfiles city:string
[x] $ rails db:migrate
$ rails db:migrate
[x] add association :
has_many :events to model/company.rb
has_many :events to
belongs_to :companyto model/event.rb
belongs_to :company
[x] add validates (:on :update pour city)
[x] resources :events
resources :events
Controller
Routes.rb
Seeds.rb
Views
[x] edit company_profiles/edit and company_profiles/show
[x] Edit views
Must have
Possibilty to participationg in an event.
Reading list
Why ?
To allow employees to have a massage.
Todo
Model
[x]
$ rails g model Event title:string description:text masseur:string participating_employees:string moment:string maximum_number_of_participation:interger
[x] add to migration :
t.belongs_to :company, index: true
t.string :participating_employees, array: true, default: []
[x]
$ rails g migration AddCityToCompanyProfiles city:string
[x]
$ rails db:migrate
[x] add association :
has_many :events to
model/company.rbbelongs_to :company
to model/event.rb[x] add validates (:on :update pour city)
[x]
resources :events
Controller
Routes.rb
Seeds.rb
Views
[x] edit company_profiles/edit and company_profiles/show
[x] Edit views
Must have
Possibilty to participationg in an event.
Reading list