Module: SpatialFeatures::FeaturesAssociationExtensions

Defined in:
lib/spatial_features/has_spatial_features.rb

Instance Method Summary collapse

Instance Method Details

#area(options = {}) ⇒ Object



278
279
280
281
282
283
284
# File 'lib/spatial_features/has_spatial_features.rb', line 278

def area(options = {})
  if options[:cache] == false || !proxy_association.owner.class.has_features_area?
    area_in_square_meters
  else
    (proxy_association.owner.features_area || area_in_square_meters).to_f
  end
end