Sha256: c2a5ce86e2d13e029aac2b4de40d4fde022e54b13140d2bb262616c39a67eeb5

Contents?: true

Size: 408 Bytes

Versions: 8

Compression:

Stored size: 408 Bytes

Contents

module CouchRest

  class Database

    alias :delete_orig! :delete!
    def delete!
      clear_model_fresh_cache
      delete_orig!
    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

Version data entries

8 entries across 8 versions & 3 rubygems

Version Path
couchrest_model-1.1.0.beta2 lib/couchrest/model/support/couchrest.rb
couchrest_model-1.1.0.beta lib/couchrest/model/support/couchrest.rb
couchrest_model-1.0.0 lib/couchrest/model/support/couchrest.rb
couchrest_model-radiant-1.0.0 lib/couchrest/model/support/couchrest.rb
couchrest_model-1.0.0.beta8 lib/couchrest/model/support/couchrest.rb
couchrest_model_thought-1.0.0.beta9 lib/couchrest/model/support/couchrest.rb
couchrest_model_thought-1.0.0.beta8 lib/couchrest/model/support/couchrest.rb
couchrest_model-1.0.0.beta7 lib/couchrest/model/support/couchrest.rb