Skip to content

Commit

Permalink
Merge pull request #91 from mattbeedle/reload-contacts-bug
Browse files Browse the repository at this point in the history
Reload contacts bug
  • Loading branch information
mattbeedle committed Jan 24, 2015
2 parents 8c7b39b + c8bc129 commit ee876a4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.10.3

- Fix regression introduced in 1.10.1 where any records that do not respond
to #contacts could not be reloaded.

## 1.10.2

- Stop serializing the result of CapsuleCRM::Serializer#serialize. It causes
Expand Down
2 changes: 1 addition & 1 deletion lib/capsule_crm/querying/find_one.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def find(id)
def reload
self.class.find(id).tap do |latest|
self.attributes = latest.attributes
self.contacts = latest.contacts
self.contacts = latest.contacts if respond_to?(:contacts)
end
associations.keys.each do |association_name|
instance_variable_set(:"@#{association_name}", nil)
Expand Down
2 changes: 1 addition & 1 deletion lib/capsule_crm/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module CapsuleCrm
VERSION = '1.10.2'
VERSION = '1.10.3'
end

0 comments on commit ee876a4

Please sign in to comment.