module Api::V1 class Parks::BaseController < BaseController before_action :set_park private def set_park @park = Park.find_by(code: params[:park_code]) head :not_found unless @park.present? end end end