Class: InstantDollarzCampaign
- Inherits:
-
SurveyCampaign
- Object
- ActiveRecord::Base
- SurveyCampaign
- InstantDollarzCampaign
- Defined in:
- app/models/instant_dollarz_campaign.rb
Overview
To change this template, choose Tools | Templates and open the template in the editor.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from SurveyCampaign
#negative_vote, #positive_vote
Class Method Details
.import ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/models/instant_dollarz_campaign.rb', line 12 def self.import InstantDollarzCategory.destroy_all response = download_instantdollarz_campaigns x = 0 if response # SurveyCampaign.destroy_all response.body.each do |line| x += 1 if x > 1 store_in_db(line) # puts("@@@@@@@@@ Response line 1 = #{line}") # puts("@@@@@@@@@ Response line count = #{response.body.size}") end #line end end disable_non_updated_campaigns return true end |
Instance Method Details
#url_to_campaign(user_id) ⇒ Object
8 9 10 |
# File 'app/models/instant_dollarz_campaign.rb', line 8 def url_to_campaign(user_id) "#{self.offer_url}&subid=#{user_id}&sid=#{SiteDetail.get_site_id}&[email protected]" end |