I have a model with following methods:
Permalink instead of ID
before_create do |article|
article.permalink = _permalink
- permalink is a field in the database
Ok, but when i try to run tests the permalink is not created, but my controllers find the object by the permalink attribute, and this is nil in the tests
@article = articles(:one)
does not create the permalink because it is not in the fixtures, and I do not want to have it there.
How can I deal with that?