Project

General

Profile

« Previous | Next » 

Revision dd9afdbf

Added by Daniel Lobato Garcia over 11 years ago

  • ID dd9afdbf74e937804d98551f18ce2afa496a210a

Feature: #686 - Hosts can inherit environment from hostgroup

View differences:

app/controllers/hosts_controller.rb
error 'No Environment selected!'
redirect_to(select_multiple_environment_hosts_path) and return
end
ev = Environment.find(id) rescue nil
#update the hosts
@hosts.each do |host|
host.environment=ev
host.environment = (id == 'inherit' && host.hostgroup.present? ) ? host.hostgroup.environment : ev
host.save(:validate => false)
end

Also available in: Unified diff