mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-14 20:24:03 +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
|
|
@ -26,11 +26,11 @@ module Admin
|
|||
|
||||
def update
|
||||
@cfp = @program.cfp
|
||||
@cfp.assign_attributes(params[:cfp])
|
||||
@cfp.assign_attributes(cfp_params)
|
||||
|
||||
send_mail_on_cfp_dates_updates = @cfp.notify_on_cfp_date_update?
|
||||
|
||||
if @cfp.update_attributes(params[:cfp])
|
||||
if @cfp.update_attributes(cfp_params)
|
||||
Mailbot.delay.send_on_cfps_dates_updates(@conference) if send_mail_on_cfp_dates_updates
|
||||
redirect_to(admin_conference_program_cfp_path(@conference.short_title),
|
||||
notice: 'Call for papers successfully updated.')
|
||||
|
|
@ -52,7 +52,7 @@ module Admin
|
|||
private
|
||||
|
||||
def cfp_params
|
||||
params[:cfp]
|
||||
params.require(:cfp).permit(:start_date, :end_date)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue