mirror of
https://github.com/publiclab/mapknitter.git
synced 2026-01-06 15:35:25 +01:00
* Adding rubocop sample config * Removing double_quotes enforcement * Using same rubocop yaml as in Plots2 * Autofixing rubocop offenses * Fixing conditions for CC Co-Authored-By: Sasha Boginsky <41092741+sashadev-sky@users.noreply.github.com> * Adding Performance cop and fixing some offenses * Fixing rubocop offenses and warnings * Downgrading rubocop version since https://github.com/publiclab/mapknitter/pull/547#issuecomment-497359929
10 lines
250 B
Ruby
10 lines
250 B
Ruby
class Way < ActiveRecord::Base
|
|
attr_accessible :body, :lat, :lon, :map_id, :color
|
|
has_many :nodes, dependent: :destroy
|
|
|
|
def bbox=(bbox)
|
|
# counting from left, counter-clockwise
|
|
self.lon1, self.lat2, self.lon2, self.lat1 = bbox
|
|
end
|
|
end
|