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
@article = articles(:one)
does not create the permalink because it is not in the fixtures, and I
not want to have it there.
How can I deal with that?