lib/propono/services/publisher.rb in propono-0.5.1 vs lib/propono/services/publisher.rb in propono-0.5.2

- old
+ new

@@ -11,10 +11,10 @@ def publish(topic_id, message) raise PublisherError.new("Topic is nil") if topic_id.nil? raise PublisherError.new("Message is nil") if message.nil? - topic_arn = TopicCreator.find_or_create(topic_id) - sns.publish(topic_arn, message) + topic = TopicCreator.find_or_create(topic_id) + sns.publish(topic.arn, message) end end end