From cd1cba67830505cd2d23ec83e64c0beed42a9f28 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 22 Jul 2015 20:08:12 +0200 Subject: mongo batch import workaround --- lib/opentox.rb | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'lib/opentox.rb') diff --git a/lib/opentox.rb b/lib/opentox.rb index 554e686..33293ac 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -12,33 +12,11 @@ module OpenTox include Mongoid::Document include Mongoid::Timestamps store_in collection: klass.downcase.pluralize + field :title, as: :name, type: String - field :title, type: String - field :description, type: String - field :parameters, type: Array, default: [] - field :creator, type: String - - # TODO check if needed - def self.subjectid - RestClientWrapper.subjectid - end - def self.subjectid=(subjectid) - RestClientWrapper.subjectid = subjectid - end end OpenTox.const_set klass,c end - def type - self.class.to_s.split('::').last - end - - # Serialisation - - # @return [String] converts OpenTox object into html document (by first converting it to a string) - def to_html - self.to_json.to_html - end - end -- cgit v1.2.3