lib/rubix/models/host.rb in rubix-0.1.2 vs lib/rubix/models/host.rb in rubix-0.1.3
- old
+ new
@@ -89,10 +89,10 @@
}.tap do |hp|
hp[:profile] = profile if profile
hp[:status] = (monitored ? 0 : 1) unless monitored.nil?
case
- when use_ip && (!ip.nil?) && (!ip.empty?)
+ when use_ip == true && (!ip.nil?) && (!ip.empty?)
hp[:useip] = 1
hp[:ip] = ip
hp[:port] = port || self.class::DEFAULT_PORT
when (!dns.nil?) && (!dns.empty?)
hp[:useip] = 0