Hi,

Last one is just cosmetic. I removed 'exception' when you request for
something which doesn't exists.

  -- Michal

---
  server/server.rb |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/server/server.rb b/server/server.rb
index b5bdfac..feffd45 100644
--- a/server/server.rb
+++ b/server/server.rb
@@ -56,6 +56,7 @@ end

  def show(model)
    @element = driver.send(model, credentials, { :id => params[:id]} )
+  not_found if @element.nil?
    instance_variable_set("@#{model}", @element)
    respond_to do |format|
      format.html { haml :"#{model.to_s.pluralize}/show" }
@@ -198,6 +199,7 @@ end

  def instance_action(name)
    @instance = driver.send(:"#{name}_instance", credentials, params["id"])
+  return not_found if @instance.nil?

    return redirect(instances_url) if name.eql?(:destroy) or 
@instance.class!=Instance

--
1.7.1

-- 
--------------------------------------------------------
Michal Fojtik, [email protected], +420 532 294 4307
Ruby / Ruby On Rails Developer
Deltacloud API: http://deltacloud.org
--------------------------------------------------------
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to