mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
Updated to rails 6. Passing tests
This commit is contained in:
parent
3430069801
commit
770ebc580e
20 changed files with 33 additions and 34 deletions
|
|
@ -15,13 +15,13 @@ class AttemptsController < ApplicationController
|
|||
)
|
||||
|
||||
unless (['start', 'resume', 'restart', 'yes', 'go'].index(twilio_params[:Body].downcase).nil?)
|
||||
recipient.update_attributes(opted_out: false)
|
||||
recipient.update(opted_out: false)
|
||||
render plain: 'Thank you, you will now begin receiving messages again.'
|
||||
return
|
||||
end
|
||||
|
||||
unless (['stop', 'cancel', 'quit', 'no'].index(twilio_params[:Body].downcase).nil?)
|
||||
recipient.update_attributes(opted_out: true)
|
||||
recipient.update(opted_out: true)
|
||||
render plain: 'Thank you, you have been opted out of these messages and will no longer receive them.'
|
||||
return
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class RecipientListsController < ApplicationController
|
|||
|
||||
# PUT schools/1/recipient_lists/1
|
||||
def update
|
||||
if @recipient_list.update_attributes(recipient_list_params)
|
||||
if @recipient_list.update(recipient_list_params)
|
||||
redirect_to([@recipient_list.school, @recipient_list], notice: 'Recipient list was successfully updated.')
|
||||
else
|
||||
render action: 'edit'
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class SchedulesController < ApplicationController
|
|||
|
||||
# PUT schools/1/schedules/1
|
||||
def update
|
||||
if @schedule.update_attributes(schedule_params)
|
||||
if @schedule.update(schedule_params)
|
||||
redirect_to([@schedule.school, @schedule], notice: 'Schedule was successfully updated.')
|
||||
else
|
||||
render action: 'edit'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue