Skip to content

calling make or make! on an association does not set the new object's association to the calling object #116

Open
@xxx

Description

This is easier to demonstrate than describe. I'm not sure if this is a feature or bug, but it works correctly in Machinist 1.

User has_many :posts
Post belongs_to :user

Post.blueprint do
  user
end

@user = User.make!

@new_post = @user.posts.make!

@new_post.user_id == @user.id # false in v. 2, true in v. 1

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions