activerecord_sqlserver_crm 4.2.8 → 4.2.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cb0a653044aa776346c9b50466e838767f1376c2
4
- data.tar.gz: 4e3e5fb397635a35bff9c5e7108574b8b0476154
3
+ metadata.gz: 601512684d4dd07d07c5b11d14be14ed5323d855
4
+ data.tar.gz: fbec369c5a1f08fe75dd3c73d0abe3f02feb343b
5
5
  SHA512:
6
- metadata.gz: 912e2f988e91f009ecf957c9c8d949d769009bd88228d6101d76554321710eed3472b8f08155e6961ddda576ee209320e4e6922e323081886a94bbd1447f499e
7
- data.tar.gz: 2f61ddea88363ef79b7543faa9d4772e8e81d7f420766f4116e5f3e859f6482dd50096e2b0f80a183d894e915fa7fd2e766b139cdbd29fcdbd6ef14d10a65490
6
+ metadata.gz: 7d4c2528c106029b7ce183cc36bd86ca13e74062f785f5d609a9d04ce7aa4e0353f17c3af1c4850d88fe95cab324ad26126b6b4cb8553d695dedf4e4da155f95
7
+ data.tar.gz: f27d29454b8b8da99bd9334a915b2d27d8b5923653b12667e118d13fab2520d7439855eed8024a60590f42926c62dbe7298f33a9adb04f5fa22810e26350dfbe
@@ -112,16 +112,19 @@ module ActiveRecordExtension
112
112
  end
113
113
  end
114
114
 
115
- # include the extension
116
- ActiveRecord::Base.send(:include, ActiveRecordExtension)
117
-
118
- # Extend belongs_to for crm_key field
119
- module BelongsToActiveRecordExtension
120
- def valid_options
121
- super + [:crm_key]
115
+ # You can switch OData off by setting param: 'odata_enabled' to false
116
+ unless ODATA_CONFIG[Rails.env]['odata_enabled'] == false
117
+ # include the extension
118
+ ActiveRecord::Base.send(:include, ActiveRecordExtension)
119
+
120
+ # Extend belongs_to for crm_key field
121
+ module BelongsToActiveRecordExtension
122
+ def valid_options
123
+ super + [:crm_key]
124
+ end
122
125
  end
123
- end
124
126
 
125
- class ActiveRecord::Associations::Builder::BelongsTo
126
- include ::BelongsToActiveRecordExtension
127
+ class ActiveRecord::Associations::Builder::BelongsTo
128
+ include ::BelongsToActiveRecordExtension
129
+ end
127
130
  end
@@ -1,3 +1,3 @@
1
1
  module ActiverecordSqlserverCrm
2
- VERSION = "4.2.8"
2
+ VERSION = "4.2.9"
3
3
  end
@@ -57,7 +57,7 @@ module ActiveRecord
57
57
  end
58
58
 
59
59
  def change_active_host
60
- slave_host = @connection_options[:slaves][0]['host']
60
+ slave_host = @connection_options[:slaves][0]['host'] if @connection_options[:slaves]
61
61
  return unless slave_host
62
62
  if using_master?
63
63
  self.active_host = slave_host
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord_sqlserver_crm
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.8
4
+ version: 4.2.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rolf Lawrenz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails