diff options
author | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-05 23:10:07 +0100 |
---|---|---|
committer | Stefan Wintermeyer <stefan.wintermeyer@amooma.de> | 2013-01-05 23:10:07 +0100 |
commit | 3862734b5e0833ed108300102c68159e40ffd93a (patch) | |
tree | 4491044dbf48aea515303382e7664cf9be2cb182 /lib/activerecord_extensions.rb | |
parent | 380a4cdfe5cfa573fb916ca7c2145a6062ef8198 (diff) | |
parent | 57196d838691aeba38ad7e088e83c0881a213861 (diff) |
Merge branch 'replace_constants' into develop
Diffstat (limited to 'lib/activerecord_extensions.rb')
-rw-r--r-- | lib/activerecord_extensions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/activerecord_extensions.rb b/lib/activerecord_extensions.rb index 50c44be..102ddd8 100644 --- a/lib/activerecord_extensions.rb +++ b/lib/activerecord_extensions.rb @@ -16,7 +16,7 @@ class ActiveRecord::Base # def populate_gs_node_id if self.attribute_names.include?('gs_node_id') && self.gs_node_id.blank? - self.gs_node_id = GsNode.where(:ip_address => HOMEBASE_IP_ADDRESS).first.try(:id) + self.gs_node_id = GsNode.where(:ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS')).first.try(:id) end end @@ -47,7 +47,7 @@ class ActiveRecord::Base logger.error "Couldn't #{action} #{self.class} with the ID #{self.id} on other GsNodes because #{self.class} doesn't have a is_native attribute." else if self.is_native != false - if defined? WRITE_GS_CLUSTER_SYNC_LOG && WRITE_GS_CLUSTER_SYNC_LOG == true + if defined? GsParameter.get('WRITE_GS_CLUSTER_SYNC_LOG') && GsParameter.get('WRITE_GS_CLUSTER_SYNC_LOG') == true if !(defined? $gs_cluster_loop_protection) || $gs_cluster_loop_protection != true begin GsClusterSyncLogEntry.create( @@ -55,7 +55,7 @@ class ActiveRecord::Base :action => action, :content => content, :history => history, - :homebase_ip_address => HOMEBASE_IP_ADDRESS, + :homebase_ip_address => GsParameter.get('HOMEBASE_IP_ADDRESS'), :waiting_to_be_synced => true, :association_method => association_method, :association_uuid => association_uuid |