mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Remove attr_accessible from Program and Cfp, final fixes after introducing strong params
This commit is contained in:
parent
62a7e724a2
commit
a0d045e156
8 changed files with 95 additions and 105 deletions
|
|
@ -10,10 +10,10 @@ module Admin
|
|||
def update
|
||||
authorize! :update, @conference.program
|
||||
@program = @conference.program
|
||||
@program.assign_attributes(params[:program])
|
||||
@program.assign_attributes(program_params)
|
||||
# send_mail_on_schedule_public = @program.notify_on_schedule_public?
|
||||
|
||||
if @program.update_attributes(params[:program])
|
||||
if @program.update_attributes(program_params)
|
||||
# Mailbot.delay.send_on_schedule_public(@conference) if send_mail_on_schedule_public
|
||||
redirect_to(admin_conference_program_path(@conference.short_title),
|
||||
notice: 'The program was successfully updated.')
|
||||
|
|
@ -26,7 +26,7 @@ module Admin
|
|||
private
|
||||
|
||||
def program_params
|
||||
params[:program]
|
||||
params.require(:program).permit(:rating, :schedule_public, :schedule_fluid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue