Skip to content

Commit

Permalink
Fix codeclimate issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cesswairimu committed Jun 7, 2019
1 parent 528ec09 commit 1d220ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/map.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 1d220ec

Please sign in to comment.