From ce5b35239fbefd71b8b45786f5345b0baadd9bd5 Mon Sep 17 00:00:00 2001 From: Saurabh Bhatia Date: Fri, 14 Feb 2014 17:18:47 +0800 Subject: [PATCH] removed register site controller --- app/controllers/admin/register_site_controller.rb | 10 ---------- app/controllers/admin/sites_controller.rb | 5 +++++ app/views/admin/register_site/index.html.erb | 1 - config/routes.rb | 6 ------ 4 files changed, 5 insertions(+), 17 deletions(-) delete mode 100644 app/controllers/admin/register_site_controller.rb delete mode 100644 app/views/admin/register_site/index.html.erb diff --git a/app/controllers/admin/register_site_controller.rb b/app/controllers/admin/register_site_controller.rb deleted file mode 100644 index 7736d56..0000000 --- a/app/controllers/admin/register_site_controller.rb +++ /dev/null @@ -1,10 +0,0 @@ -class Admin::RegisterSiteController < OrbitBackendController - def index - end - - def register_site - site = Site.first - site.register_site - redirect_to admin_module_store_path - end -end \ No newline at end of file diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb index 2e492dd..a3b3384 100644 --- a/app/controllers/admin/sites_controller.rb +++ b/app/controllers/admin/sites_controller.rb @@ -147,6 +147,11 @@ class Admin::SitesController < OrbitBackendController render :text => "success" end + def register_site + @site.register_site + redirect_to admin_module_store_path + end + protected def update_design(design) diff --git a/app/views/admin/register_site/index.html.erb b/app/views/admin/register_site/index.html.erb deleted file mode 100644 index cd8907f..0000000 --- a/app/views/admin/register_site/index.html.erb +++ /dev/null @@ -1 +0,0 @@ -<%= link_to "Register", register_site_admin_register_site_index_path, :class => "btn btn-primary"%> diff --git a/config/routes.rb b/config/routes.rb index bbfc832..af22d24 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -272,12 +272,6 @@ Orbit::Application.routes.draw do match 'template_store' => 'template_store#index' match 'template_store/download_theme' => "template_store#download_theme" match 'template_store/template/:id' => 'template_store#show', :as => :template_store_template - - resources :register_site, only: [:index] do - collection do - post 'register_site' - end - end # match 'template_store/cool_method' => "template_store#cool_method" end