[PATCH conductor] pool_family_id param added to new_pool_path

ifarkas at redhat.com ifarkas at redhat.com
Wed Dec 14 16:00:35 UTC 2011


From: Imre Farkas <ifarkas at redhat.com>

https://bugzilla.redhat.com/show_bug.cgi?id=761119
---
 src/app/controllers/pools_controller.rb     |    1 +
 src/app/views/pool_families/_list.html.haml |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/app/controllers/pools_controller.rb b/src/app/controllers/pools_controller.rb
index 7e4503a..699376e 100644
--- a/src/app/controllers/pools_controller.rb
+++ b/src/app/controllers/pools_controller.rb
@@ -109,6 +109,7 @@ class PoolsController < ApplicationController
   def new
     require_privilege(Privilege::CREATE, Pool)
     @pool = Pool.new
+    @pool.pool_family = PoolFamily.find(params[:pool_family_id]) unless params[:pool_family_id].blank?
     @quota = Quota.new
     respond_to do |format|
       format.html
diff --git a/src/app/views/pool_families/_list.html.haml b/src/app/views/pool_families/_list.html.haml
index 1cf70ec..7e2c7b7 100644
--- a/src/app/views/pool_families/_list.html.haml
+++ b/src/app/views/pool_families/_list.html.haml
@@ -15,7 +15,7 @@
             .section-controls
               #obj_actions
                 = link_to t(:edit), edit_pool_family_path(pool_family), :class => 'rounded-link'
-                = link_to t("pools.new_pool"), new_pool_path, :class => 'rounded-link'
+                = link_to t("pools.new_pool"), new_pool_path(:pool_family_id => pool_family.id), :class => 'rounded-link'
                 = link_to t("images.new.new_image"), new_image_path( :environment => pool_family.id), :class => 'rounded-link'
       - unless pool_family.pools.blank?
         %tr
-- 
1.7.6.4




More information about the aeolus-devel mailing list