From 1d220ec8db405a5b906a461f94be26cfb3109724 Mon Sep 17 00:00:00 2001 From: Cess Date: Wed, 5 Jun 2019 21:27:54 +0300 Subject: [PATCH] Fix codeclimate issues --- app/models/map.rb | 2 +- app/models/tag.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/map.rb b/app/models/map.rb index 798371cb6..7d20a84fc 100755 --- a/app/models/map.rb +++ b/app/models/map.rb @@ -140,7 +140,7 @@ def nearby_maps(dist) return [] if lat.to_f == 0.0 || lon.to_f == 0.0 Map.where('id != ? AND lat > ? AND lat < ? AND lon > ? AND lon < ?', - id, lat - dist, lat + dist, lon - dist, lon + dist) + id, lat - dist, lat + dist, lon - dist, lon + dist) .limit(10) end diff --git a/app/models/tag.rb b/app/models/tag.rb index 390df29ac..8e052b8df 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -2,7 +2,7 @@ class Tag < ActiveRecord::Base belongs_to :map belongs_to :user - validates_presence_of :name, on: :create, message: "can't be blank" + validates_presence_of :name, on: :create, message: "can't be blank" validates_presence_of :user_id, on: :create, message: "can't be blank" validates_presence_of :map_id, on: :create, message: "can't be blank"