Permalink
Browse files

Minor updates for improved similarity with ActiveRecord.

  • Loading branch information...
1 parent 4752eea commit ad585c826ec7cde881fed6b7f6dc0b93553c6000 @leeatchison committed Jan 26, 2012
Showing with 8 additions and 0 deletions.
  1. +5 −0 lib/active_dynamodb/attributes.rb
  2. +1 −0 lib/active_dynamodb/persistence.rb
  3. +2 −0 lib/active_dynamodb/table.rb
@@ -22,6 +22,11 @@ def attributes= attrs
end
def update_attributes attrs
self.assign_attributes(attrs)
+ self.save
+ end
+ def update_attributes! attrs
+ self.assign_attributes(attrs)
+ self.save!
end
#
# Assign all mass assignable attributes
@@ -69,6 +69,7 @@ def destroy
attributes={}
end
@id=nil
+ return true
end
end
module Persistence
@@ -38,6 +38,7 @@ def create_table options={}
sleep 1 until the_table.status==:active
end
end
+ self.table_status
end
@@ -47,6 +48,7 @@ def create_table options={}
def delete_table
dynamodb_table.delete
@dynamodb_table=nil
+ :terminating
end
#
# Return the current read capacity

0 comments on commit ad585c8

Please sign in to comment.