Class: Crm::Scheduler::ProfilesController
- Inherits:
-
CrmController
- Object
- CrmController
- Crm::Scheduler::ProfilesController
- Defined in:
- app/controllers/crm/scheduler/profiles_controller.rb
Instance Method Summary collapse
Instance Method Details
#edit ⇒ Object
10 11 12 |
# File 'app/controllers/crm/scheduler/profiles_controller.rb', line 10 def edit redirect_to employee_path(@profile.employee, tab: 'scheduler') end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/crm/scheduler/profiles_controller.rb', line 6 def index @profiles = SchedulerProfile.includes(employee: :employee_record).order('parties.full_name') end |
#update ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/controllers/crm/scheduler/profiles_controller.rb', line 14 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 |