bradphelan/rocket_tag — pull request #19 by keithpitt (2012-06-25 20:17:48+00:00)
Title: Context Searching

Hi,

I kept getting errors like this:

```
SQLite3::SQLException: no such column: taggings.skills: SELECT * FROM (SELECT count("taggable_models"."id") AS tags_count, taggable_models.* FROM "taggable_models" INNER JOIN "taggings" ON "taggings"."taggable_id" = "taggable_models"."id" AND "taggings"."taggable_type" = 'TaggableModel' INNER JOIN "tags" ON "tags"."id" = "taggings"."tag_id" WHERE "tags"."name" IN ('a', 'german') AND "taggings"."context" = "taggings"."skills" GROUP BY taggable_models.id, taggable_models.name, taggable_models.type, taggable_models.foo) taggable_models WHERE "taggable_models"."tags_count" = 2
```

After doing some digging, I found that when you're doing a context search, you're using the my{} syntax. That would mean that it's looking at the context on the taggings object, which to my knowledge, shouldn't exist - or ever should. This changes fixes that and fixes the specs.