mongoid/mongoid — Issue #1649: association_ids method
Author: semaperepelitsa
Created: 2012-01-27 05:33:20+00:00
State: open

When I define a `has_many :photos` association I would like to have `photo_ids` and `photo_ids=` methods. Right now I define them myself:

```ruby
def photo_ids=(ids)
self.photos = Photo.find(ids)
end
```

This is useful if I have a form with many checkboxes named `doc[photo_ids][]` so that on submit photos are set on `update_attributes` automatically. Active Record already has this.