Commit b6c58a29f7126b45bab13247ec0630a17b02df27
1 parent
56f0dd6e
Exists in
master
and in
29 other branches
Set default tag context for article taggings
Showing
1 changed file
with
11 additions
and
0 deletions
Show diff stats
db/migrate/20140808185510_update_default_tagging_context.rb
0 → 100644
@@ -0,0 +1,11 @@ | @@ -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 |