ActiveRecordBehavior defining relations?


I’ve tried to make an behavior which functionality is to count visitors to a certain item. My only question is, isn’t it possible to define relations, on behalf of the active record class, in a behavior, and if not; why, if it is then; how?

Thanks :slight_smile:

I looked into trying to define new active relations but couldn’t see how.

Instead I created a behavior with a config method similar to relations(), before realizing that I didn’t need the new relations anyway, doh!

See here: Help with AR relationships

Hope this helps.