When a host update has errors then the render :edit loses required variables
The user is editing a pre-existing host. The user presses update. The record fails validation.
Instead of redirect_to @host we render :action => :edit
The Hostscontroller#edit method sets three variables which are used in the render :action => edit operation. These are not set when rendering from another method.
#3 Updated by Paul Kelly about 9 years ago
I tried sending the patch as an email, Maybe that as the problem. If I run git log -p
diff --git a/app/controllers/hosts_controller.rb b/app/controllers/hosts_controller.rb index 6a20117..9630d7d 100644 --- a/app/controllers/hosts_controller.rb +++ b/app/controllers/hosts_controller.rb @@ -51,9 +51,6 @@ class HostsController < ApplicationController def edit @host = Host.find(params[:id]) - @environment = @host.environment - @architecture = @host.architecture - @operatingsystem = @host.operatingsystem end