change logic N+1 query

parent e55a2d71
class CitiesController < ApplicationController
VIETNAM = 1
FOREIGN = 0
def index
@cities_vietnam = City.location(City::VIETNAM)
@cities_international = City.location(City::FOREIGN)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment