>
>
> +    if (not params[:cloud_account][:x509_cert_priv_file].nil?) &&
> params[:cloud_account][:x509_cert_priv_file] != ""
>       params[:cloud_account][:x509_cert_priv] =
> params[:cloud_account][:x509_cert_priv_file].read
>     end
>

I think you can use blank? method instead of writing this long expressions

if params[:cloud_account] &&
params[:cloud_account][:x509_cert_priv_file].blank?
...
end


> +      redirect_to :controller => "provider", :action => "accounts", :id =>
> @provider, :cloud_account => params[:cloud_account]
>

I think it would be cool if you could have every redirect_to with routes
instead of hard coded controller/action style:

redirect_to provider_account_path(:id => @provider.id, :cloud_account =>
params[:cloud_account])

+      provider_hash = {:name => @provider.name, :url => @provider.url}
> +      redirect_to :action => "new", :provider => provider_hash
>

I think you can get rid of the variable and only pass the hash directly.

-- Ladislav
_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to