Sha256: 06a538aebc832a136642a934094c074b6ef5d0d5ee59a6578f1b1d763ee96967
Contents?: true
Size: 541 Bytes
Versions: 5
Compression:
Stored size: 541 Bytes
Contents
# frozen_string_literal: true class UrbanAreasController < ApplicationController def index urban_areas = USGeo::UrbanArea.not_removed @tab = params[:tab] if @tab.present? type = if @tab == "urbanized" "UrbanizedArea" elsif @tab == "cluster" "UrbanCluster" end urban_areas = urban_areas.where(type: type) end @urban_areas = urban_areas.order(:name) end def show @urban_area = USGeo::UrbanArea.find(params[:id]) add_breadcrumb(urban_area_id: @urban_area) end end
Version data entries
5 entries across 5 versions & 1 rubygems