Skip to content

Instantly share code, notes, and snippets.

@corbanbrook
Created January 22, 2013 17:30
Show Gist options
  • Select an option

  • Save corbanbrook/4596491 to your computer and use it in GitHub Desktop.

Select an option

Save corbanbrook/4596491 to your computer and use it in GitHub Desktop.
class PcmagAddDealLinksScript < Mongoid::Migration
def self.up
site = Property::Site.where(uid: "pcmag").first
smartphone = Sys::Platform.where(name: "smartphone").first
app = site.where(platform: smartphone).first
script = Property::Script.create({ app: app,
name: 'deal links',
type: 'js',
source_path: "theme://javascripts/plugins/zdcse.js",
category: 'plugin'
})
end
def self.down
site = Property::Site.where(uid: "pcmag").first
smartphone = Sys::Platform.where(name: "smartphone").first
app = site.where(platform: smartphone).first
script = Property::Script.where(app: app, name: 'deal links').first.destroy
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment