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