title: Rails 5 ActsAsTaggable Mass Update tags in rails console?
body: <p>So I'm trying to update any of my relevant resources with a new tag, based off what the old one is.</p>
  
  <p>Any Post that is tagged with <code>test</code>, I want to update it so that all those Posts that are tagged with test will now be tagged with <code>new-testing-tag</code> for example.</p>
  
  <p>My other question is, if I have multiple tags associated with a Post, and I just wanted to update one of them, would the process by the same?</p>
  
  <p>for example: Post has tags "javascript" and "premium" -- i just want to change "premium" to free. Is this possible?</p>
  
  <p>tried all of these, in the 
  rails console</p>
  
  <pre><code>Post.tagged_with("test").update_all(tag: "new-testing-tag")
  Post.tagged_with("test").update_all(tags: "test2")
  Post.tagged_with("test").update_all(tag_list: "test2")
  </code></pre>
  
  <p>none of them worked though, all of them throw this back: ActiveRecord::StatementInvalid: PG::UndefinedColumn: ERROR:  column "tag" of relation "multiple_choice_questions" does not exist
  LINE 1: UPDATE "multiple_choice_questions" SET "tag" = 'test2' WHERE...</p>
  
  <p>This is in my schema.db file</p>
  
  <pre><code>  create_table "taggings", force: :cascade do |t|
      t.bigint "tag_id"
      t.string "taggable_type"
      t.bigint "taggable_id"
      t.string "tagger_type"
      t.bigint "tagger_id"
      t.string "context", limit: 128
      t.datetime "created_at"
      t.index ["context"], name: "index_taggings_on_context"
      t.index ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true
      t.index ["tag_id"], name: "index_taggings_on_tag_id"
      t.index ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context"
      t.index ["taggable_id", "taggable_type", "tagger_id", "context"], name: "taggings_idy"
      t.index ["taggable_id"], name: "index_taggings_on_taggable_id"
      t.index ["taggable_type", "taggable_id"], name: "index_taggings_on_taggable_type_and_taggable_id"
      t.index ["taggable_type"], name: "index_taggings_on_taggable_type"
      t.index ["tagger_id", "tagger_type"], name: "index_taggings_on_tagger_id_and_tagger_type"
      t.index ["tagger_id"], name: "index_taggings_on_tagger_id"
      t.index ["tagger_type", "tagger_id"], name: "index_taggings_on_tagger_type_and_tagger_id"
    end
  
    create_table "tags", force: :cascade do |t|
      t.string "name"
      t.integer "taggings_count", default: 0
      t.index ["name"], name: "index_tags_on_name", unique: true
    end
  </code></pre>