From c858faa20607125097a3ca36f9178c4b4076b071 Mon Sep 17 00:00:00 2001 From: mguetlein Date: Thu, 12 May 2011 12:45:18 +0200 Subject: move to ruby-plot 0.0.3, use png instead of svg, use ?media for compound images --- lib/ohm_util.rb | 7 ++++--- lib/ot_predictions.rb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3