summaryrefslogtreecommitdiff
path: root/lib/compound.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compound.rb')
-rw-r--r--lib/compound.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compound.rb b/lib/compound.rb
index 693cdc7..99e6c7e 100644
--- a/lib/compound.rb
+++ b/lib/compound.rb
@@ -7,7 +7,7 @@ get "/compound/descriptor/?:descriptor?" do
when "application/json"
return "#{JSON.pretty_generate PhysChem::DESCRIPTORS} " unless params[:descriptor]
return {params[:descriptor] => PhysChem::DESCRIPTORS[params[:descriptor]]}.to_json if PhysChem::DESCRIPTORS.include?(params[:descriptor])
- return {PhysChem.find(params[:descriptor])}.to_json if PhysChem.find(params[:descriptor])
+ return PhysChem.find(params[:descriptor]).to_json if PhysChem.find(params[:descriptor])
else
return PhysChem::DESCRIPTORS.collect{|k, v| "#{k}: #{v}\n"} unless params[:descriptor]
return PhysChem::DESCRIPTORS[params[:descriptor]] if PhysChem::DESCRIPTORS.include?(params[:descriptor])