Skip to content

Commit

Permalink
Inline SpecialistDocumentEdition::MANUAL_DOCUMENT_TYPE
Browse files Browse the repository at this point in the history
  • Loading branch information
floehopper committed Mar 13, 2017
1 parent b46a498 commit ea7f8f2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions app/models/specialist_document_edition.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ class SpecialistDocumentEdition
include Mongoid::Document
include Mongoid::Timestamps

MANUAL_DOCUMENT_TYPE = "manual".freeze

field :document_id, type: String
field :version_number, type: Integer, default: 1
field :title, type: String
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class RemoveSpecialistDocumentEditionsWithNonManualDocumentType < Mongoid::Migration
def self.up
SpecialistDocumentEdition.where(:document_type.ne => SpecialistDocumentEdition::MANUAL_DOCUMENT_TYPE).delete_all
SpecialistDocumentEdition.where(:document_type.ne => 'manual').delete_all
end

def self.down
Expand Down

0 comments on commit ea7f8f2

Please sign in to comment.