Permalink
Browse files

fix crowdring typo.

  • Loading branch information...
1 parent 9f87977 commit 44d685571aaf0879619e6cecc38c17938dbdcc6f Willa committed Nov 15, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 lib/crowdring/crowdring.rb
View
7 lib/crowdring/crowdring.rb
@@ -300,14 +300,15 @@ def process_request(service_name, request, response_type)
redirect to("/campaign/#{campaign.id}/asks/new")
end
ask_name = Ask.descendants.find{|a| a.typesym == ask_type.to_sym}
- trigger_by = params[:trigger_by]
+ triggered_by = params[:triggered_by]
message = params[:campaign][:message]
if params[:prompt]
ask = Ask.create(type:ask_name,message: message, prompt: params[:prompt])
+ else
+ ask = Ask.create(type: ask_name, message: message)
end
- ask = Ask.create(type: ask_name, message: message)
- if trigger_by == 'previous'
+ if triggered_by == 'previous'
campaign.asks.last.triggered_ask = ask
end
campaign.asks << ask

0 comments on commit 44d6855

Please sign in to comment.