RailsCasts Pro episodes are now free!

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 ?