/ Published in: Rails
                    
                                        
Useful for building nested entries checkboxes etc
                
                            
                                Expand |
                                Embed | Plain Text
                            
                        
                        Copy this code and paste it in your HTML
(Interest.all - user.interests).each do |interest|
user.interest_users.build(:interest => interest)
end
Comments
 Subscribe to comments
                    Subscribe to comments
                
                