app/models/g5_updatable/location.rb in g5_updatable-0.6.0 vs app/models/g5_updatable/location.rb in g5_updatable-0.6.1
- old
+ new
@@ -6,9 +6,10 @@
validates :uid, :urn, :client_uid, presence: true
scope :by_client_uid, -> (client_uid) { where(client_uid: client_uid) }
scope :by_urn, -> (urn) { where(urn: urn) }
- scope :max_updated_at, -> { maximum(:updated_at) }
+ scope :max_updated_at, -> { maximum(:updated_at) }
+ delegate :urn, to: :client, prefix: true, allow_nil: true
end
end