couchrest_model/lib/couchrest/model/support/couchrest.rb
Sam Lown c280b3a29b Renaming to CouchRest Model
Refactored basic directory structure.
Moved to ActiveSupport for Validations and Callbacks.
Cleaned up older code, and removed support for text property types.
2010-06-20 22:01:11 +02:00

20 lines
406 B
Ruby

module CouchRest
class Database
alias :delete_old! :delete!
def delete!
clear_model_fresh_cache
delete_old!
end
# If the database is deleted, ensure that the design docs will be refreshed.
def clear_model_fresh_cache
::CouchRest::Model::Base.subclasses.each{|klass| klass.req_design_doc_refresh if klass.respond_to?(:req_design_doc_refresh)}
end
end
end