Forum: Ruby on Rails can i limit a has_many photos per user?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
treebeard (Guest)
on 2007-03-16 19:02
is there a rails way?

or should i just a do a before_save :check_limit, and just tally up the
amount of photos before saving? so maybe do something like

if == 4, max limit set. etc...

This topic is locked and can not be replied to.