Permalink
Browse files

Replaced calls to #destroy! with #destroy

  • Loading branch information...
Jed Hurt
Jed Hurt committed Sep 17, 2008
1 parent 822b195 commit b97d2cbe2b6062848a149b57fc5b2d7fc4fc1a08
Showing with 4 additions and 4 deletions.
  1. +4 −4 gems/gems/openid_dm_store-0.1.1/lib/openid_dm_store.rb
@@ -29,7 +29,7 @@ def get_association(server_url, handle=nil)
a = assoc.from_record
if a.expires_in == 0
# assoc.destroy
- assoc.destroy!
+ assoc.destroy
else
return a
end
@@ -40,7 +40,7 @@ def get_association(server_url, handle=nil)
def remove_association(server_url, handle)
# Association.delete_all(['server_url = ? AND handle = ?', server_url, handle]) > 0
- Association.all(:server_url => server_url, :handle => handle).destroy!
+ Association.all(:server_url => server_url, :handle => handle).destroy
end
def use_nonce(server_url, timestamp, salt)
@@ -54,13 +54,13 @@ def use_nonce(server_url, timestamp, salt)
def cleanup_nonces
now = Time.now.to_i
# Nonce.delete_all(["timestamp > ? OR timestamp < ?", now + OpenID::Nonce.skew, now - OpenID::Nonce.skew])
- Nonce.all(:conditions => ["timestamp > ? OR timestamp < ?", now + OpenID::Nonce.skew, now - OpenID::Nonce.skew]).destroy!
+ Nonce.all(:conditions => ["timestamp > ? OR timestamp < ?", now + OpenID::Nonce.skew, now - OpenID::Nonce.skew]).destroy
end
def cleanup_associations
now = Time.now.to_i
# Association.delete_all(['issued + lifetime > ?',now])
- Association.all(:conditions => ['issued + lifetime > ?', now]).destroy!
+ Association.all(:conditions => ['issued + lifetime > ?', now]).destroy
end
end

0 comments on commit b97d2cb

Please sign in to comment.