# "app/controllers/state_controller.rb" class StateController < ApplicationController scaffold :state def list @states = State.find_all @states.each do |state| @state.counties = County.find(@params[@state.id]) end end def edit @state = State.find(@params["id"]) @counties = County.find_all end end