diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-12 12:45:18 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-12 12:45:18 +0200 |
commit | c858faa20607125097a3ca36f9178c4b4076b071 (patch) | |
tree | 358baf64e55162f9abd30f1833ccc56ebaab0603 /lib | |
parent | a730ae5a2a34ece618ae7b66c50b0d5aca7c9120 (diff) |
move to ruby-plot 0.0.3, use png instead of svg, use ?media for compound images
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ohm_util.rb | 7 | ||||
-rwxr-xr-x | lib/ot_predictions.rb | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/ohm_util.rb b/lib/ohm_util.rb index 21d7978..856f9d2 100644 --- a/lib/ohm_util.rb +++ b/lib/ohm_util.rb @@ -6,7 +6,7 @@ module Lib prop_names = model.attributes.collect{|p| p.to_s} params.keys.each do |k| key = k.to_s - if (key == "subjectid") + if (key == "subjectid" || key == "media") params.delete(k) else unless prop_names.include?(key) @@ -28,10 +28,11 @@ module Lib end def self.find(model, filter_params) - if (filter_params.size==0) + params = check_params(model,filter_params) + if (params.size==0) model.all else - model.find(check_params(model,filter_params)) + model.find(params) end end diff --git a/lib/ot_predictions.rb b/lib/ot_predictions.rb index 1fd601c..22f9b20 100755 --- a/lib/ot_predictions.rb +++ b/lib/ot_predictions.rb @@ -213,7 +213,7 @@ module Lib begin #a.push( "http://ambit.uni-plovdiv.bg:8080/ambit2/depict/cdk?search="+ # URI.encode(OpenTox::Compound.new(:uri=>p.identifier(i)).smiles) ) if add_pic - a << p.identifier(i)+"/image" + a << p.identifier(i)+"?media=image/png" rescue => ex raise ex #a.push("Could not add pic: "+ex.message) |