diff options
author | Christoph Helma <helma@in-silico.ch> | 2015-07-22 20:08:12 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2015-07-22 20:08:12 +0200 |
commit | cd1cba67830505cd2d23ec83e64c0beed42a9f28 (patch) | |
tree | 23da8b4f04549afe61403fc419152cb3fd51c876 /lib/opentox.rb | |
parent | e797fda1f946490d288e0ea7fd4eaf58eb18a746 (diff) |
mongo batch import workaround
Diffstat (limited to 'lib/opentox.rb')
-rw-r--r-- | lib/opentox.rb | 24 |
1 files changed, 1 insertions, 23 deletions
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 |