diff --git a/app/controllers/platforms/product_build_lists_controller.rb b/app/controllers/platforms/product_build_lists_controller.rb index 281fd3d28..bed67a54b 100644 --- a/app/controllers/platforms/product_build_lists_controller.rb +++ b/app/controllers/platforms/product_build_lists_controller.rb @@ -26,7 +26,7 @@ class Platforms::ProductBuildListsController < Platforms::BaseController if @product_build_list.destroy flash[:notice] = t('flash.product_build_list.delete') else - flash[:notice] = t('flash.product_build_list.delete_error') + flash[:error] = t('flash.product_build_list.delete_error') end redirect_to [@platform, @product] end diff --git a/app/views/platforms/product_build_lists/_product_build_list.html.haml b/app/views/platforms/product_build_lists/_product_build_list.html.haml index 1f8b6f253..8325f843f 100644 --- a/app/views/platforms/product_build_lists/_product_build_list.html.haml +++ b/app/views/platforms/product_build_lists/_product_build_list.html.haml @@ -3,5 +3,6 @@ %td= product_build_list.human_status %td= link_to nil, product_build_list.container_path %td= link_to product_build_list.product.name, platform_product_path(product_build_list.product.platform, product_build_list.product) - %td= link_to image_tag('x.png'), platform_product_product_build_list_path(product_build_list.product.platform, product_build_list.product, product_build_list), :method => :delete, :confirm => t("layout.confirm") if can?(:destroy, product_build_list) && product_build_list.can_destroy? + - pbl = product_build_list + %td= link_to image_tag('x.png'), platform_product_product_build_list_path(pbl.product.platform, pbl.product, pbl), :method => :delete, :confirm => t("layout.confirm") if can?(:destroy, pbl) && pbl.can_destroy? %td= l(product_build_list.updated_at, :format => :long) \ No newline at end of file