aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/game_board.rb
Commit message (Collapse)AuthorAgeFilesLines
* Using existing models for building multiple has_one through testsRyuta Kamizono2018-04-221-7/+0
| | | | Follow up of #32514.
* Fix .new with multiple through associationsSam DeCesare2018-04-091-0/+7
This fixes a bug with building an object that has multiple `has_many :through` associations through the same object. Previously, when building the object via .new, the intermediate object would be created instead of just being built. Here's an example: Given a GameBoard, that has_one Owner and Collection through Game. The following line would cause a game object to be created in the database. GameBoard.new(owner: some_owner, collection: some_collection) Whereas, if passing only one of those associations into `.new` would cause the Game object to be built and not created in the database. Now the above code will only build the Game object, and not save it.