Quantcast
Channel: Substrakt
Viewing all articles
Browse latest Browse all 229

has_many association limit in Rails

$
0
0

Imagine you have an Organisation and User model and each Organisation has many Users. However, each Organisation has a maximum number of Users. Using only nice idiomatic Rails, do you enforce this constraint at the model level? There’s lots of nasty ways to do this that I’ve bodged together in the past, but yesterday I […]

The post has_many association limit in Rails appeared first on Substrakt.


Viewing all articles
Browse latest Browse all 229

Trending Articles