Posted By

davidb on 10/02/14


Tagged

rails ruby nestedattributes


Versions (?)

Nested Attributes - Minus records from record set


 / Published in: Rails
 

Useful for building nested entries checkboxes etc

  1. (Interest.all - user.interests).each do |interest|
  2. user.interest_users.build(:interest => interest)
  3. end

Report this snippet  

You need to login to post a comment.