sql >> Base de Datos >  >> NoSQL >> MongoDB

activerecord y puente mongo/mongo-mapper

Esto funcionó muy bien

modelo de lugares

  key :location_id, Integer, :required => true

    def location
        Location.find(location_id)
    end

modelo de ubicaciones

  def self.find_places(id)
    Property.find_by_location_id(id)
  end

  def find_places
    Property.find_by_location_id(id)
  end