Skip to content

Unable to save foreign key after child loaded #4

@jwarchol

Description

@jwarchol

Found an issue where update_attributes doesn't work for foreign key attributes if the foreign child has been loaded.

a = Attendee.find(12345)
puts a.candidate_type.id # 879
a.update_attributes(candidate_type_id: 880)
a.save # will PUT with 879, not 880

Do you think this is an expected behavior or a bug?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions