Class: SpatialCache
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SpatialCache
- Defined in:
- app/models/spatial_cache.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.between(spatial_model, klass) ⇒ Object
4 5 6 7 |
# File 'app/models/spatial_cache.rb', line 4 def self.between(spatial_model, klass) where(SpatialFeatures::Utils.polymorphic_condition(spatial_model, 'spatial_model')) .where(:intersection_model_type => SpatialFeatures::Utils.class_name_with_ancestors(klass)) end |
Instance Method Details
#stale? ⇒ Boolean
9 10 11 |
# File 'app/models/spatial_cache.rb', line 9 def stale? spatial_model.has_spatial_features_hash? && self.features_hash != spatial_model.features_hash end |