[eluser]Michael Ditto[/eluser]
Is it possible to add a relation to an object from inside one of its custom validation rules?
Specifically, I'm taking some user-provided content (a tweet), parsing through it looking for hashtags and URLs, shortening said URLs, checking to see if they exist in the database already, and saving them as related objects. It's all preparatory logic because it can alter the content of the tweet (shortened URLs, eliminating duplicate hashtags if necessary, all to get it under 140 characters) so the logical place to do it is in a validation method.
Currently I'm doing it outside of the object, but it would be really sweet for my model to be totally self-contained to avoid repeating a bunch of logic.