I have a RoR 4 app, and its model have these associations:
has_many :accreditations
has_one :legal, -> { where(kind_cd: Accreditation.legal) }, class_name: 'Accreditation'
has_many :departments, -> { where(kind_cd: Accreditation.department) }, class_name: 'Accreditation'
So, you see that these associations similar, but legal
& departments
have more conditions than accreditations
. Can I replace class_name: 'Accreditation'
with something like using :accreditations
?