From a07c943bfe29184e4c0456168a3dfbf1c6db400b Mon Sep 17 00:00:00 2001 From: Cyril Mougel Date: Thu, 29 Aug 2013 15:38:31 +0200 Subject: [PATCH] To legacy purpose we need App _id to be string --- app/models/app.rb | 8 ++++++++ 1 file changed, 8 insertions(+), 0 deletions(-) diff --git a/app/models/app.rb b/app/models/app.rb index 857a43e..4eb3fa5 100644 --- a/app/models/app.rb +++ b/app/models/app.rb @@ -15,6 +15,14 @@ class App field :notify_on_deploys, :type => Boolean, :default => false field :email_at_notices, :type => Array, :default => Errbit::Config.email_at_notices + # Some legacy apps may have string as key instead of BSON::ObjectID + # identity :type => String + field :_id, + type: String, + pre_processed: true, + default: ->{ Moped::BSON::ObjectId.new.to_s } + + embeds_many :watchers embeds_many :deploys embeds_one :issue_tracker -- libgit2 0.21.2