Class: Crm::Scheduler::ProfilesController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Scheduler::ProfilesController
- Defined in:
- app/controllers/crm/scheduler/profiles_controller.rb
Overview
Controller: profiles.
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
11 12 13 |
# File 'app/controllers/crm/scheduler/profiles_controller.rb', line 11 def edit redirect_to employee_path(@profile.employee, tab: 'scheduler') end |
#index ⇒ Object
7 8 9 |
# File 'app/controllers/crm/scheduler/profiles_controller.rb', line 7 def index @profiles = SchedulerProfile.includes(employee: :employee_record).order('parties.full_name') end |
#update ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/controllers/crm/scheduler/profiles_controller.rb', line 15 def update if @profile.update(profile_params) redirect_to employee_path(@profile.employee, tab: 'scheduler'), notice: 'Availability updated.' else redirect_to employee_path(@profile.employee, tab: 'scheduler'), alert: @profile.errors..to_sentence end end |