Project

General

Profile

« Previous | Next » 

Revision 14b42ec5

Added by Tomer Brisker almost 7 years ago

Fixes #19418 - Correctly route cancel button on host form

View differences:

app/views/hosts/_form.html.erb
<%= hidden_field_tag 'bare_metal_capabilities', @host.bare_metal_capabilities %>
<%= f.hidden_field :overwrite? %>
<%= submit_or_cancel f, @host.overwrite?, :cancel_path => @host.new_record? || !@host.name_changed? ? @host : edit_host_path(@host.name_was) %>
<%= submit_or_cancel f, @host.overwrite?, :cancel_path => (@host.new_record? ? hosts_path : host_path(:id => @host.name_was)) %>
<% end %>
<% end %>

Also available in: Unified diff