From ddb3dfa92ec0878240211cb2b7a8e125961b1360 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 5 Jan 2013 23:01:16 +0100 Subject: Moved to GsParemeter.get and set defaults for a couple of validations. --- app/models/gs_cluster_sync_log_entry.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/gs_cluster_sync_log_entry.rb') diff --git a/app/models/gs_cluster_sync_log_entry.rb b/app/models/gs_cluster_sync_log_entry.rb index 063ff23..51e3b05 100644 --- a/app/models/gs_cluster_sync_log_entry.rb +++ b/app/models/gs_cluster_sync_log_entry.rb @@ -15,7 +15,7 @@ class GsClusterSyncLogEntry < ActiveRecord::Base after_create :apply_to_local_database def apply_to_local_database - if self.homebase_ip_address != HOMEBASE_IP_ADDRESS + if self.homebase_ip_address != GsParameter.get('HOMEBASE_IP_ADDRESS') if self.class_name.constantize.new.attribute_names.include?('is_native') case self.action when 'create' @@ -84,7 +84,7 @@ class GsClusterSyncLogEntry < ActiveRecord::Base end def populate_other_cluster_nodes - if self.homebase_ip_address == HOMEBASE_IP_ADDRESS && self.waiting_to_be_synced == true + if self.homebase_ip_address == GsParameter.get('HOMEBASE_IP_ADDRESS') && self.waiting_to_be_synced == true if GsNode.where(:push_updates_to => true).count > 0 GsNode.where(:push_updates_to => true).each do |gs_node| RemoteGsNode::GsClusterSyncLogEntry.site = gs_node.site -- cgit v1.2.3