Commit f9554c7b7b3e361ec9fb6fa9b407e319fb7b0da2
1 parent
989fd900
Exists in
master
and in
1 other branch
Slight change necessary to questions#create to allow
for nil ideas (photocracy)
Showing
1 changed file
with
8 additions
and
1 deletions
Show diff stats
app/controllers/questions_controller.rb
| ... | ... | @@ -83,7 +83,14 @@ class QuestionsController < InheritedResources::Base |
| 83 | 83 | def create |
| 84 | 84 | logger.info "all params are #{params.inspect}" |
| 85 | 85 | logger.info "vi is #{params['question']['visitor_identifier']} and local are #{params['question']['local_identifier']}." |
| 86 | - if @question = current_user.create_question(params['question']['visitor_identifier'], :name => params['question']['name'], :local_identifier => params['question']['local_identifier'], :information => params['question']['information'], :ideas => (params['question']['ideas'].lines.to_a.delete_if {|i| i.blank?})) | |
| 86 | + if @question = | |
| 87 | + current_user.create_question( | |
| 88 | + params['question']['visitor_identifier'], | |
| 89 | + :name => params['question']['name'], | |
| 90 | + :local_identifier => params['question']['local_identifier'], | |
| 91 | + :information => params['question']['information'], | |
| 92 | + :ideas => (params['question']['ideas'].lines.to_a.delete_if {|i| i.blank?} rescue nil) | |
| 93 | + ) | |
| 87 | 94 | respond_to do |format| |
| 88 | 95 | format.xml { render :xml => @question.to_xml} |
| 89 | 96 | end | ... | ... |