need create association in rails based on condition from parent object, like
class User < ActiveRecord::Base has_many :versions
here how to mention, that User must have versions, only if user is a super_admin(for example)
Aucun commentaire:
Enregistrer un commentaire