我有一個位置模式和我的位置控制器中我使用的是geokit寶石搜索附近的地點:軌道4控制器:如何使用邏輯運算符正確
@locations = Location.near(current_user.location, 250)
如何我居然在一個控制器動作區分比如說一個地點是不是is_remote == true
?
含義:
@locations
實際上應該輸出所有的位置,它們要麼is_remote == true
或near(current_user.location, 250)
。
在此先感謝您的每一個答案!如果您需要更多信息,請告訴我。
如何獲得'is_remote == true'條件的位置? –
'Location.where(is_remote:true)' – Gugubaight