mbleigh/acts-as-taggable-on — pull request #299 by jure (2013-04-25 12:35:57+00:00)
Title: Saving comma separated tags is incorrect

Here's a mystery. I tried adding "WATFIV, WATFOR" as a tag, but it gets saved as WATFIV and WATFOR separately, even though tag_list correctly parses the string into 1 tag.
```
irb(main):079:0> jure.knowledge_list ='"WATFIV, WATFOR", hello'
=> "\"WATFIV, WATFOR\", hello"
irb(main):080:0> jure.knowledge_list
=> ["WATFIV, WATFOR", "hello"]
irb(main):081:0> jure.knowledge_list.size
=> 2
irb(main):082:0> jure.save
(0.4ms) BEGIN
User Exists (0.6ms) SELECT 1 AS one FROM "users" WHERE ("users"."name" = 'jure' AND "users"."id" != 2) LIMIT 1
(0.6ms) UPDATE "users" SET "updated_at" = '2012-10-16 11:28:14.610106' WHERE "users"."id" = 2
ActsAsTaggableOn::Tag Load (5.8ms) SELECT "tags".* FROM "tags" WHERE (lower(name) = 'watfiv' OR lower(name) = 'watfor' OR lower(name) = 'hello')
ActsAsTaggableOn::Tag Load (0.7ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 2 AND "taggings"."taggable_type" = 'User' AND (taggings.context = 'knowledge' AND taggings.tagger_id IS NULL)
ActsAsTaggableOn::Tagging Exists (0.5ms) SELECT 1 AS one FROM "taggings" WHERE ("taggings"."tag_id" = 1977 AND "taggings"."taggable_type" = 'User' AND "taggings"."taggable_id" = 2 AND "taggings"."context" = 'knowledge' AND "taggings"."tagger_id" IS NULL AND "taggings"."tagger_type" IS NULL) LIMIT 1
SQL (0.5ms) INSERT INTO "taggings" ("context", "created_at", "tag_id", "taggable_id", "taggable_type", "tagger_id", "tagger_type") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["context", "knowledge"], ["created_at", Tue, 16 Oct 2012 11:28:14 UTC +00:00], ["tag_id", 1977], ["taggable_id", 2], ["taggable_type", "User"], ["tagger_id", nil], ["tagger_type", nil]]
ActsAsTaggableOn::Tagging Exists (0.5ms) SELECT 1 AS one FROM "taggings" WHERE ("taggings"."tag_id" = 1978 AND "taggings"."taggable_type" = 'User' AND "taggings"."taggable_id" = 2 AND "taggings"."context" = 'knowledge' AND "taggings"."tagger_id" IS NULL AND "taggings"."tagger_type" IS NULL) LIMIT 1
SQL (0.4ms) INSERT INTO "taggings" ("context", "created_at", "tag_id", "taggable_id", "taggable_type", "tagger_id", "tagger_type") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["context", "knowledge"], ["created_at", Tue, 16 Oct 2012 11:28:14 UTC +00:00], ["tag_id", 1978], ["taggable_id", 2], ["taggable_type", "User"], ["tagger_id", nil], ["tagger_type", nil]]
ActsAsTaggableOn::Tagging Exists (0.5ms) SELECT 1 AS one FROM "taggings" WHERE ("taggings"."tag_id" = 1979 AND "taggings"."taggable_type" = 'User' AND "taggings"."taggable_id" = 2 AND "taggings"."context" = 'knowledge' AND "taggings"."tagger_id" IS NULL AND "taggings"."tagger_type" IS NULL) LIMIT 1
SQL (0.4ms) INSERT INTO "taggings" ("context", "created_at", "tag_id", "taggable_id", "taggable_type", "tagger_id", "tagger_type") VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING "id" [["context", "knowledge"], ["created_at", Tue, 16 Oct 2012 11:28:14 UTC +00:00], ["tag_id", 1979], ["taggable_id", 2], ["taggable_type", "User"], ["tagger_id", nil], ["tagger_type", nil]]
ActsAsTaggableOn::Tag Load (0.7ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 2 AND "taggings"."taggable_type" = 'User' AND (taggings.context = 'interests' AND taggings.tagger_id IS NULL)
(0.6ms) COMMIT
=> true
irb(main):083:0> jure.reload
User Load (1.5ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 2]]
=> #
irb(main):084:0> jure.knowledge_list
ActsAsTaggableOn::Tag Load (1.2ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 2 AND "taggings"."taggable_type" = 'User' AND (taggings.context = 'knowledge' AND taggings.tagger_id IS NULL)
=> ["Watfiv", "watfor", "Hello"]
irb(main):085:0> jure.knowledge_list.size
=> 3
```

So even though the knowledge_list reader correctly parses the tags, the .save calls something else that parses the string incorrectly and splits the tags on that comma. Any ideas? I'll dig a bit deeper myself.