Why can't I push a record multiple times when using has_many?
class Template
include Mongoid::Document
has_and_belongs_to_many :widgets, inverse_of: nil
Attempt to add duplicates:
(rdb:387) self.widgets.push(Widget.first)
[BSON::ObjectId('4f7096776c51c8135000000d')]
(rdb:387) self.widgets.push(Widget.first)
[BSON::ObjectId('4f7096776c51c8135000000d')]
(rdb:387) self.widgets.count
1