This commit is contained in:
r888888888
2014-04-14 14:32:01 -07:00
parent 7a61048d69
commit fad0ab7c93
105 changed files with 610 additions and 485 deletions

View File

@@ -3,6 +3,7 @@ class Advertisement < ActiveRecord::Base
has_many :hits, :class_name => "AdvertisementHit"
after_create :copy_to_servers
after_destroy :delete_from_servers
attr_accessible :ad_type, :width, :height, :referral_url, :status, :file_name, :is_work_safe, :hit_count
def copy_to_servers
RemoteFileManager.new(image_path).distribute