Sha256: c82a6ea3960181d4696ee7c7ceefa3fa86b060eecd94f5a814c7823671df0b4c
Contents?: true
Size: 347 Bytes
Versions: 4
Compression:
Stored size: 347 Bytes
Contents
# # Mongoid fields extension # # field :foo, :sphere => true # Mongoid::Fields.option :sphere do |model, field, _options| # options = {} unless options.kind_of?(Hash) model.class_eval do spatial_fields << field.name.to_sym spatial_fields_indexed << field.name.to_sym # Create 2Dsphere index sphere_index field.name end end
Version data entries
4 entries across 4 versions & 1 rubygems