diff --git a/app/controllers/guidances_controller.rb b/app/controllers/guidances_controller.rb index 3d22eb3..fc3ae57 100644 --- a/app/controllers/guidances_controller.rb +++ b/app/controllers/guidances_controller.rb @@ -42,7 +42,9 @@ @guidance.question_id = params["question_id"] @guidance.themes = [] - guidance_params[:theme_ids].map{|t| @guidance.themes << Theme.find(t.to_i) unless t.empty? } + if !guidance_params[:theme_ids].nil? + guidance_params[:theme_ids].map{|t| @guidance.themes << Theme.find(t.to_i) unless t.empty? } + end if @guidance.published == true then @gg = GuidanceGroup.find(@guidance.guidance_group_id)