forked from spen/seminar
Fix bug.
This commit is contained in:
parent
33d957da89
commit
78a1fa18f2
|
@ -533,8 +533,9 @@ class SeminarsController < ApplicationController
|
||||||
def update
|
def update
|
||||||
@con = SeminarSignupContribute.find(params[:seminar_signup_contribute][:id])
|
@con = SeminarSignupContribute.find(params[:seminar_signup_contribute][:id])
|
||||||
update_params = seminar_signup_contribute_params.merge('seminar_submission_values'=>params['seminar_submission_values'])
|
update_params = seminar_signup_contribute_params.merge('seminar_submission_values'=>params['seminar_submission_values'])
|
||||||
flag = true
|
|
||||||
update_params.permit!
|
update_params.permit!
|
||||||
|
unless update_params['seminar_submission_values'].nil?
|
||||||
|
flag = true
|
||||||
if update_params['seminar_submission_values']['0']['value'].class==String
|
if update_params['seminar_submission_values']['0']['value'].class==String
|
||||||
value = update_params['seminar_submission_values']['0']['value']
|
value = update_params['seminar_submission_values']['0']['value']
|
||||||
if !value.to_s.blank?
|
if !value.to_s.blank?
|
||||||
|
@ -547,10 +548,10 @@ class SeminarsController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if flag
|
if flag
|
||||||
update_params['seminar_submission_values']['0']['value']['en'] = ' '
|
update_params['seminar_submission_values']['0']['value']['en'] = ' '
|
||||||
end
|
end
|
||||||
|
end
|
||||||
@con.update_attributes(update_params)
|
@con.update_attributes(update_params)
|
||||||
if @con.save
|
if @con.save
|
||||||
signup = SeminarSignup.where(id:update_params['seminar_signup_id']).first
|
signup = SeminarSignup.where(id:update_params['seminar_signup_id']).first
|
||||||
|
|
Loading…
Reference in New Issue