This project is archived and is in readonly mode.
default_scope doesn't work with has_many << (insertion)
-
nachocab (at gmail)
I uploaded a sample app with a failing test: http://github.com/nachocab/defau...
-
Paweł Kondzior
Isn't this because << is adding to db and to local array that contains cached data ?
After h.reload, h.rooms should be ordered
-
nachocab (at gmail)
- Assigned user cleared.
You're right Paweł. I hadn't realized it was saving it into a local array until the House record was created. No need to reload, really, just doing House.create and then adding both rooms returns the records with default_scope. Thanks for clearing it up. You can cancel this ticket.
-
DHH
- State changed from new to invalid