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:
parent
2e1cd164a4
commit
29b920d746
9 changed files with 67 additions and 69 deletions
|
|
@ -1,32 +0,0 @@
|
|||
.row
|
||||
.col-md-12
|
||||
.page-header
|
||||
%h1 Schedules
|
||||
%p.text-muted
|
||||
The schedules for your conference
|
||||
.row
|
||||
.col-md-12
|
||||
%table.table.table-hover#event_types
|
||||
%thead
|
||||
%th Schedule
|
||||
%th Selected
|
||||
%th Actions
|
||||
%tbody
|
||||
- @schedules.each do |schedule|
|
||||
%tr
|
||||
%td
|
||||
Schedule
|
||||
= schedule.id
|
||||
%td
|
||||
= (schedule == @selected_schedule) ? 'Yes' : 'No'
|
||||
%td
|
||||
.btn-group{role: "group"}
|
||||
= link_to 'Show', admin_conference_schedule_path(@conference.short_title, schedule.id),
|
||||
method: :get, class: 'btn btn-primary'
|
||||
= link_to 'Delete', admin_conference_schedule_path(@conference.short_title, schedule.id),
|
||||
method: :delete, class: 'btn btn-danger', data: { confirm: "Do you really want to delete Schedule #{schedule.id}?" }
|
||||
|
||||
.row
|
||||
.col-md-12.text-right
|
||||
= link_to 'Add Schedule', admin_conference_schedule_index_path(@conference.short_title),
|
||||
method: :post, class: 'btn btn-primary'
|
||||
Loading…
Add table
Add a link
Reference in a new issue