lib/sklik-api/campaign.rb in sklik-api-0.1.2 vs lib/sklik-api/campaign.rb in sklik-api-0.1.3

- old
+ new

@@ -318,18 +318,18 @@ def log_error message errors << message end - def rollback! + def rollback! suffix = "FAILED ON CREATION" #don't rollback if it is disabled! return false unless SklikApi.use_rollback? #remember errors! old_errors = errors SklikApi.log :info, "Campaign: #{@args[:campaign_id]} - ROLLBACK!" - update :name => "#{@args[:name]} FAILED ON CREATION - #{Time.now.strftime("%Y.%m.%d %H:%M:%S")}" + update :name => "#{@args[:name]} #{suffix} - #{Time.now.strftime("%Y.%m.%d %H:%M:%S")}" #remove adgroup remove #return remembered errors! @errors = old_errors