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 +4 -4
- data/lib/active_record_extension.rb +13 -10
- data/lib/activerecord_sqlserver_crm/version.rb +1 -1
- data/lib/sql_server_adapter.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 601512684d4dd07d07c5b11d14be14ed5323d855
|
4
|
+
data.tar.gz: fbec369c5a1f08fe75dd3c73d0abe3f02feb343b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d4c2528c106029b7ce183cc36bd86ca13e74062f785f5d609a9d04ce7aa4e0353f17c3af1c4850d88fe95cab324ad26126b6b4cb8553d695dedf4e4da155f95
|
7
|
+
data.tar.gz: f27d29454b8b8da99bd9334a915b2d27d8b5923653b12667e118d13fab2520d7439855eed8024a60590f42926c62dbe7298f33a9adb04f5fa22810e26350dfbe
|
@@ -112,16 +112,19 @@ module ActiveRecordExtension
|
|
112
112
|
end
|
113
113
|
end
|
114
114
|
|
115
|
-
#
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
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
|
-
|
127
|
+
class ActiveRecord::Associations::Builder::BelongsTo
|
128
|
+
include ::BelongsToActiveRecordExtension
|
129
|
+
end
|
127
130
|
end
|
data/lib/sql_server_adapter.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|