fix bug  in ActiveRecord::Railties::ControllerRuntime

fix issue https://github.com/rails/rails/issues/9215