1
votes

I do have User, Tag, and Tagging model.
Tag and Tagging models were automatically created by the gem called acts_as_taggable_on (https://github.com/mbleigh/acts-as-taggable-on)
Tag model is the master table of tags. Then Tagging model is the consisted by the records of relationship between taggable model and what tag it's for.

Everything is implemetented looked working fine so far.
However, when the user is trying to save these tags,
TEST PC ProjectX It automatically creates and saves these
TEST PC ProjectX Projectx

Projectx actually exist because somebody else is using but I don't want it here unless the user types it.

In this case, I've already set up my User model as 3 tags at most for each User record so it shouldn't succeed at saving.
However, it goes through fine:(

How can I handle this problem? I don't want it matching case. I just want it binary matching.

Is it possible?

1

1 Answers

1
votes

I'm not sure if I understand your problem exactly so I'll start here; perhaps you could start with saving everything in lowercase to see if your problem still exists...

If you want force tags to be saved downcased, put this in an initializer:

ActsAsTaggableOn.force_lowercase = true

source: https://github.com/mbleigh/acts-as-taggable-on#configuration