From 6eb425eaed329acf229c4e4adb3fbb0ac4a9f8d5 Mon Sep 17 00:00:00 2001 From: Adam Cooke Date: Fri, 21 Apr 2017 10:32:22 +0100 Subject: [PATCH] move org ip rules into their own controller --- ..._pools_controller.rb => organization_ip_pools_controller.rb} | 2 +- app/views/ip_pool_rules/edit.html.haml | 2 +- app/views/ip_pool_rules/index.html.haml | 2 +- app/views/ip_pool_rules/new.html.haml | 2 +- app/views/{ip_pools => organization_ip_pools}/_nav.html.haml | 0 app/views/{ip_pools => organization_ip_pools}/index.html.haml | 0 config/routes.rb | 2 +- 7 files changed, 5 insertions(+), 5 deletions(-) rename app/controllers/{ip_pools_controller.rb => organization_ip_pools_controller.rb} (65%) rename app/views/{ip_pools => organization_ip_pools}/_nav.html.haml (100%) rename app/views/{ip_pools => organization_ip_pools}/index.html.haml (100%) diff --git a/app/controllers/ip_pools_controller.rb b/app/controllers/organization_ip_pools_controller.rb similarity index 65% rename from app/controllers/ip_pools_controller.rb rename to app/controllers/organization_ip_pools_controller.rb index ec4662c..7190828 100644 --- a/app/controllers/ip_pools_controller.rb +++ b/app/controllers/organization_ip_pools_controller.rb @@ -1,4 +1,4 @@ -class IPPoolsController < ApplicationController +class OrganizationIPPoolsController < ApplicationController include WithinOrganization diff --git a/app/views/ip_pool_rules/edit.html.haml b/app/views/ip_pool_rules/edit.html.haml index 6b2f715..e4cc4d4 100644 --- a/app/views/ip_pool_rules/edit.html.haml +++ b/app/views/ip_pool_rules/edit.html.haml @@ -16,5 +16,5 @@ → Edit rule = render 'organizations/nav', :active_nav => :ips - = render 'ip_pools/nav', :active_nav => :rules + = render 'organization_ip_pools/nav', :active_nav => :rules = render 'form' diff --git a/app/views/ip_pool_rules/index.html.haml b/app/views/ip_pool_rules/index.html.haml index 1e2ab1d..577cf0a 100644 --- a/app/views/ip_pool_rules/index.html.haml +++ b/app/views/ip_pool_rules/index.html.haml @@ -17,7 +17,7 @@ → IP Pool Rules = render 'organizations/nav', :active_nav => :ips - = render 'ip_pools/nav', :active_nav => :rules + = render 'organization_ip_pools/nav', :active_nav => :rules .pageContent.pageContent--compact - if @ip_pool_rules.empty? diff --git a/app/views/ip_pool_rules/new.html.haml b/app/views/ip_pool_rules/new.html.haml index 203a64a..a582d30 100644 --- a/app/views/ip_pool_rules/new.html.haml +++ b/app/views/ip_pool_rules/new.html.haml @@ -16,6 +16,6 @@ → Add new rule = render 'organizations/nav', :active_nav => :ips - = render 'ip_pools/nav', :active_nav => :rules + = render 'organization_ip_pools/nav', :active_nav => :rules = render 'form' diff --git a/app/views/ip_pools/_nav.html.haml b/app/views/organization_ip_pools/_nav.html.haml similarity index 100% rename from app/views/ip_pools/_nav.html.haml rename to app/views/organization_ip_pools/_nav.html.haml diff --git a/app/views/ip_pools/index.html.haml b/app/views/organization_ip_pools/index.html.haml similarity index 100% rename from app/views/ip_pools/index.html.haml rename to app/views/organization_ip_pools/index.html.haml diff --git a/config/routes.rb b/config/routes.rb index dba4d45..e4fc4e6 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -60,7 +60,7 @@ Rails.application.routes.draw do post :make_owner, :on => :member end resources :ip_pool_rules - resources :ip_pools + resources :ip_pools, :controller => 'organization_ip_pools' root 'servers#index' get 'settings' => 'organizations#edit' patch 'settings' => 'organizations#update'