diff --git a/app/controllers/admin/module_store_controller.rb b/app/controllers/admin/module_store_controller.rb index ced1adf..38a1354 100644 --- a/app/controllers/admin/module_store_controller.rb +++ b/app/controllers/admin/module_store_controller.rb @@ -1,5 +1,5 @@ class Admin::ModuleStoreController < OrbitBackendController - before_filter :check_central_server_connection, :only => [:get_extensions] + before_filter :check_central_server_connection def index @extensions = get_extensions diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb index a3b3384..5e355b0 100644 --- a/app/controllers/admin/sites_controller.rb +++ b/app/controllers/admin/sites_controller.rb @@ -131,6 +131,7 @@ class Admin::SitesController < OrbitBackendController %x(git stash) unless need_stash %x(git fetch origin) pull_result = %x(git pull -r --ff-only 2>&1 origin #{@branch}) + %x(git stash pop) unless need_stash if pull_result.include? "fatal: Not possible to fast-forward, aborting." result = "failed" @@ -138,7 +139,6 @@ class Admin::SitesController < OrbitBackendController result = "success" Bundler.with_clean_env { `cd #{Rails.root} && bundle install && touch tmp/restart.txt` } end - %x(git stash pop) unless need_stash render :text => result end diff --git a/app/controllers/admin/template_store_controller.rb b/app/controllers/admin/template_store_controller.rb index 299b96c..7e07067 100644 --- a/app/controllers/admin/template_store_controller.rb +++ b/app/controllers/admin/template_store_controller.rb @@ -3,7 +3,7 @@ require 'uri' require 'fileutils' require 'zip/zip' class Admin::TemplateStoreController < OrbitBackendController - before_filter :check_central_server_connection, :only => [:get_templates] + before_filter :check_central_server_connection before_filter :set_store def index diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 98618ef..4f4549f 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -483,7 +483,7 @@ class ApplicationController < ActionController::Base if @site.site_token? flash[:notice]="Connected to the Store" else - redirect_to admin_register_site_index_path + redirect_to admin_sites_register_site_path flash[:notice]="To Access the Store Please Connect It" end end diff --git a/app/models/site.rb b/app/models/site.rb index d1cfe57..3ea5251 100644 --- a/app/models/site.rb +++ b/app/models/site.rb @@ -108,7 +108,7 @@ class Site api_key = STORE_CONFIG[:store_settings]["api_key"] self.generate_site_token store = Store.new(self.id.to_s,self.site_token,api_key) - store.post_client(self.id.to_s,self.site_token,self.name) + store.post_client(self.id.to_s,self.site_token,self.title) end end