Sha256: 233b028580039e43e698bf444fc6862c11fcb938017b3e9d7054da04db5e3ea9
Contents?: true
Size: 405 Bytes
Versions: 5
Compression:
Stored size: 405 Bytes
Contents
module G5Updatable::BelongsToLocation extend ActiveSupport::Concern def location_uid=(location_uid) @location = nil write_attribute(:location_uid, location_uid) end def location @location ||= G5Updatable::Location.find_by_uid!(location_uid) rescue ActiveRecord::RecordNotFound raise ActiveRecord::RecordNotFound.new("Can't find a location for uid '#{location_uid}'") end end
Version data entries
5 entries across 5 versions & 1 rubygems