12 lines
278 B
Ruby
12 lines
278 B
Ruby
|
class CitiesController < ApplicationController
|
||
|
def index
|
||
|
@cities = City.all
|
||
|
@cities = City.all.includes(:weather_arts).page(params[:page])
|
||
|
end
|
||
|
|
||
|
def show
|
||
|
@city = City.find(params[:id])
|
||
|
@weather_arts = @city.weather_arts.latest.page(params[:page])
|
||
|
end
|
||
|
end
|