lib/couch_potato.rb in couch_potato-0.5.6 vs lib/couch_potato.rb in couch_potato-0.5.7
- old
+ new
@@ -11,9 +11,15 @@
Config = Struct.new(:database_name, :validation_framework, :split_design_documents_per_view).new
Config.validation_framework = :active_model
Config.split_design_documents_per_view = false
class NotFound < StandardError; end
+
+ # returns all the classes that implement the CouchPotato::Persistence module
+ def self.models
+ @models ||= []
+ @models
+ end
# Returns a database instance which you can then use to create objects and query views. You have to set the CouchPotato::Config.database_name before this works.
def self.database
@@__database ||= Database.new(self.couchrest_database)
end