Sign in through GitHub

Please read for an updated status on RailsCasts:

Learn more or hide this

Chris Baxter's Profile

GitHub User: baxtercr

Site: http://www.catalyst-mobile.com/

Comments by Chris Baxter

Avatar

in our scenario we need to vary the number of associated records allowed. We have validation in the model i.e

accepts_nested_attributes_for :answers , :limit => 4,:allow_destroy => true

My question is . how do we prevent the Add Answers link from being rendered if we already have reached our limit ?

Avatar

in our scenario we need to vary the number of associated records allowed. We have validation in the model i.e

accepts_nested_attributes_for :answers , :limit => 4,:allow_destroy => true

My question is . how do we prevent the Add Answers link from being rendered if we already have reached our limit ?