Corrections in SchedulesController

- Controler file name pluralized
- Load and authorization fixed and improved
- Consider that save can fail in create action
- Eliminate unnecessary if in update action
- Ability and tests related to the schedules link in the admin sidebar fixed
This commit is contained in:
Ana 2016-08-04 00:56:01 +02:00
parent 2e1cd164a4
commit 29b920d746
9 changed files with 67 additions and 69 deletions

View file

@ -81,9 +81,9 @@
- if can? :update, @conference.program.difficulty_levels.build, conference_id: @conference.id
%li{:class=> active_nav_li(admin_conference_program_difficulty_levels_path(@conference.short_title))}
= link_to 'Difficulty Levels', admin_conference_program_difficulty_levels_path(@conference.short_title)
- if can? :update, @conference.program.events.build
%li{class: active_nav_li(admin_conference_schedule_index_path(@conference.short_title))}
= link_to 'Schedules', admin_conference_schedule_index_path(@conference.short_title)
- if can? :update, @conference.program.schedules.build
%li{class: active_nav_li(admin_conference_schedules_path(@conference.short_title))}
= link_to 'Schedules', admin_conference_schedules_path(@conference.short_title)
- if can? :update, Registration.new(conference_id: @conference.id)
%li{:class=> active_nav_li(admin_conference_registrations_path(@conference.short_title))}