ar-ondemand 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yzk3YzYxMjU4NmM2MzQ2MDczNWRmM2JjMDkwYzQ1ZTQ3M2E4OWMzMg==
4
+ YzRhMGZlZGYyYzgyZTFmY2E5M2RkZDhkNjNkZmRhYmM4OTY1NmY2Ng==
5
5
  data.tar.gz: !binary |-
6
- OGQyZDMxNDY3Zjg1YWVmMDcwNDgwNzYwOWQ0NTk0MjkyOTM0MjQ0Ng==
6
+ MzdlNmI1MDRlZWIyOGJkZWMzODVlYjljZjA0ZDFhMmMxMGRjNTc0YQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmY1YzAzZjI4MDY5MThhMjc5NjVjZmFiOTE0YjIyMTVlNjE0ZTRhZmM5ZDFi
10
- MDVjMGIzNDRkZDJhMjkxMjcwNzY2NjI0MTg1MjBkZDIxZTcxYjJhOWE5ZDcx
11
- Y2IxZmFmZDc3NDQ0YWVjYWZkM2E1ZjNmMjU4NThlYjdhNTA2MjM=
9
+ MjJiNWNiZjg1YmYyYzJiMzE2ZWViMGY3ZTE5ZTg2ZTQ5Y2M5ZWYxNTU1MzBk
10
+ NmM0ZmZhNWRlNTc2YTVmMjYzYTUyOGNhNGEyODY5MWJjNDQzMTA5YmRjNmRm
11
+ NDQyMjVkOTAzOWFjZDEyZTM4NTQ5MjE0YzUwMDlmMTI5ZjIxN2M=
12
12
  data.tar.gz: !binary |-
13
- ZGM5NzJhYTlhZDg0NGJhNWNjNGRmYzQ2YTc5NTc3Y2ZkYmE4NWI5MTQ0OGE4
14
- MThhZTk1NzgyYjc1Njc5OTI5YTA0MjhkODQ0YTAyYzJjOTRlNTA4YWFjYTU0
15
- N2E1OWYwM2IyY2FmMTZiZTdhNzkyNWQ5OGQyN2M0OTM0ZTE3ZjQ=
13
+ MDZhZWNmZWI5MDE2ZmIyMzUwYzU1OWRjODY4Mzc0ODI4OWJmOGE2NzQzYjM2
14
+ Nzk4ODE3ODJjNjBmNDA1MGNiZjJjYjk4ZDdjYWY4YTZlYWE4ZGUxOGViZDg2
15
+ YjJkZjQ0NjIxYjgxYmVhYWVkODJkMjM4NjgxYTEyOGQwYjQwNjk=
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ar-ondemand (1.1.0)
4
+ ar-ondemand (1.1.1)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
 
@@ -40,8 +40,10 @@ module ActiveRecord
40
40
  unless rec.persisted?
41
41
  # These are not getting initialized for some reason, so set using what is passed in
42
42
  @defaults.each_pair do |k, v|
43
+ next unless v.is_a?(::ActiveRecord::Base)
43
44
  meth = k.to_s
44
- rec.send("#{meth[0...-3]}=", v) if meth.end_with? '_id'
45
+ next unless meth.end_with? '_id'
46
+ rec.send("#{meth[0...-3]}=", v)
45
47
  end
46
48
  # This helps prevent a lookup into the db when we know there couldn't be any data yet
47
49
  @model.reflections.select { |_, v| v.macro == :has_and_belongs_to_many }.keys.each do |r|
@@ -1,3 +1,3 @@
1
1
  module ArOnDemand
2
- VERSION = '1.1.0'
2
+ VERSION = '1.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar-ondemand
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Frank