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.
This commit is contained in:
parent
9f1eea8d32
commit
c280b3a29b
70 changed files with 1725 additions and 3733 deletions
19
lib/couchrest/model/support/couchrest.rb
Normal file
19
lib/couchrest/model/support/couchrest.rb
Normal file
|
@ -0,0 +1,19 @@
|
|||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue