Commit b6c58a29f7126b45bab13247ec0630a17b02df27

Authored by Victor Costa
1 parent 56f0dd6e

Set default tag context for article taggings

db/migrate/20140808185510_update_default_tagging_context.rb 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +class UpdateDefaultTaggingContext < ActiveRecord::Migration
  2 +
  3 + def self.up
  4 + ActsAsTaggableOn::Tagging.where(:taggable_type => Article, :context => nil).update_all(:context => 'tags')
  5 + end
  6 +
  7 + def self.down
  8 + ActsAsTaggableOn::Tagging.where(:taggable_type => Article, :context => 'tags').update_all(:context => nil)
  9 + end
  10 +
  11 +end
... ...