Permalink
Browse files

adding ignore international sms

  • Loading branch information...
1 parent fb4ae5f commit 7faf3223ab2854263797995f5ae7fd0a746b359c Willa committed Nov 16, 2012
@@ -26,7 +26,7 @@ def initialize(key, secret)
end
def numbers
- @client.get_account_numbers(size:100).object[:numbers].map {|n| n[:msisdn] }
+ @client.get_account_numbers(size:100).object["numbers"].map{|n| n["msisdn"]}
end
def build_response(from, commands)
@@ -1,5 +1,6 @@
%h3 Send SMS Ask
%h4 Initial Cost Estimate
=haml :price_estimate, locals: {price_estimate: ask.initial_price_estimate(@campaign.ringers, @campaign.sms_number.raw_number)}
+
="#{ask.recipients.count} recipients"
=haml :message, locals: {message: ask.message}
@@ -38,8 +38,11 @@
%h3
-if @campaign.sms_number
=@campaign.sms_number.pretty_phone_number
- %h4="Cost per text message: $#{@sms_cost}"
- %h5="(Assuming messages are sent to #{@campaign.sms_number.country_abbreviation} numbers)"
+ -if @sms_cost
+ %h4="Cost per text message: $#{@sms_cost}"
+ %h5="(Assuming messages are sent to #{@campaign.sms_number.country_abbreviation} numbers)"
+ -else
+ %h4 Cost per text message: Unknown.
-else
No SMS number selected
#campaign-ringers
@@ -56,10 +59,12 @@
#asks
%h2= "ASKS"
-@campaign.asks.each do |ask|
+ %hr
-if @campaign.asks.select{|n| n.triggered_ask && n.triggered_ask == ask}.empty? && ask != @campaign.asks.first
%form{action: "/campaign/#{@campaign.id}/asks/#{ask.id}/trigger", method: "post"}
%button{type:'submit'} Launch the Ask
=haml :ask, locals: {ask: ask, type: ask.class.typesym}
+ %hr
%form{action: "/campaign/#{@campaign.id}/asks/new", method: 'get'}
%button Add new ask

0 comments on commit 7faf322

Please sign in to comment.