Skip to content

Instantly share code, notes, and snippets.

@somebee
Created October 17, 2008 19:03
Show Gist options
  • Save somebee/17497 to your computer and use it in GitHub Desktop.
Save somebee/17497 to your computer and use it in GitHub Desktop.
def update_and_reload!(attributes)
update!(attributes)
if identity_map.any?
query = @key_properties.zip(identity_map.keys.transpose).to_hash.merge(attributes)
model.all(query).reload(:fields => attributes.keys)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment