Permalink
Browse files

Added instance accessor for CouchRest database connection object

  • Loading branch information...
topfunky committed Sep 14, 2008
1 parent 435f723 commit 596701cfbe856e012700e9d303b347c08fda1df5
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/basic_model.rb
View
@@ -51,6 +51,10 @@ def self.db(database_name)
database
end
+ def db
+ self.class.db(@database_name)
+ end
+
def initialize(database_name, attributes={})
@database_name = database_name
@attributes = default_attributes.merge(attributes)

0 comments on commit 596701c

Please sign in to comment.