I've got a system set up where a post can have many tags and vice versa. This is a HABTM relationship. Everything works fine, and there's a input box for me to select the relevant tags when adding a post.
However I would like to implement a system like StackOverflow's where if I type in a tag that doesn't already exist, Cake first creates that tag in my tags table before saving the post (along with the relationship in the join table).
The only way I've found to do this is outlined here (scroll down to "HABTM Text Add") where I manually check if the tag exists and if not, I insert it. I was wondering if Cake has a "built in" way of doing this, or there's a better way that conforms with Cake's "fat model slim controller" convention.
Thanks!