Class: Unidom::Geo::Location

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Common::Concerns::ModelExtension
Defined in:
app/models/unidom/geo/location.rb

Overview

Location 是地理位置。具体对应到某一个街道地址。

Instance Method Summary collapse

Instance Method Details

#locate!(located, by: nil, at: Time.now) ⇒ Object



27
28
29
# File 'app/models/unidom/geo/location.rb', line 27

def locate!(located, by: nil, at: Time.now)
  locatings.create! located: located, locator: by, opened_at: at
end