Skip to content

Instantly share code, notes, and snippets.

@cmingxu
Created August 5, 2011 00:53
Show Gist options
  • Save cmingxu/1126694 to your computer and use it in GitHub Desktop.
Save cmingxu/1126694 to your computer and use it in GitHub Desktop.
lass PromotedDistributor < ActiveRecord::Base
has_many :promotions
end
class OpenfeintDistributor < PromotedDistributor
class << self
# this will determine asset upload step
def assets
[["Banner", "display banner for openfeint"],["30x30 asset","display in blabla"]]
end
# application or channels within Openfeint
def channels
[
["Spotlight","/distributor/openfeint/spotlight"],
["GameChannel","/distributor/openfeint/game_channel"],
["Embedded","/distributor/openfeint/embeded"]
]
end
end
end
class AttDistributor < PromotedDistributor
class << self
# this will determine asset upload step
def assets
[["Att Banner", "display banner for AT&T"],["20x20 asset","display in blabla"], ["100x100","display in blabla"]]
end
# application or channels within Openfeint
def channels
[["Gameworld","/distributor/att/game_world"]]
end
end
end
class AttDistributor < PromotedDistributor
class << self
# this will determine asset upload step
def assets
[["Att Banner", "display banner for AT&T"],["20x20 asset","display in blabla"], ["100x100","display in blabla"]]
end
# application or channels within Openfeint
def channels
[["Gameworld","/distributor/att/game_world"]]
end
end
end
class DistributionRequest < ActiveRecord::Base
has_many :distribution_assets
end
class DistributionAsset < ActiveRecord::Base
belongs_to :distribution_request
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment