RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: baxtercr
Site: http://www.catalyst-mobile.com/
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 ?
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 ?
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 ?