|
@@ -1,5 +1,8 @@ |
|
|
class Post < ActiveRecord::Base |
|
|
class Post < ActiveRecord::Base |
|
|
belongs_to :feed |
|
|
belongs_to :feed |
|
|
|
|
|
validates :title, :presence => true |
|
|
|
|
|
validates :lat, :numericality => { :greater_than_or_equal_to => -90, :less_than_or_equal_to => 90 } |
|
|
|
|
|
validates :lon, :numericality => { :greater_than_or_equal_to => -180, :less_than_or_equal_to => 180 } |
|
|
|
|
|
|
|
|
EARTH_RADIUS_METRES = 6378000 |
|
|
EARTH_RADIUS_METRES = 6378000 |
|
|
|
|
|
|
|
|