Skip to content

Instantly share code, notes, and snippets.

@jdescelliers
Created February 5, 2023 16:10
Show Gist options
  • Save jdescelliers/353847270972a5d48789d79d69871327 to your computer and use it in GitHub Desktop.
Save jdescelliers/353847270972a5d48789d79d69871327 to your computer and use it in GitHub Desktop.
class Person < ApplicationRecord
belongs_to :location, optional: true
end
# p = Person.find(1)
# p.location.upsert(latitude: 1234, longitude: 5678)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment