Skip to content

Instantly share code, notes, and snippets.

@ugisozols
Created April 5, 2012 14:57
Show Gist options
  • Save ugisozols/2311754 to your computer and use it in GitHub Desktop.
Save ugisozols/2311754 to your computer and use it in GitHub Desktop.
diff --git a/core/app/assets/javascripts/refinery/boot_wym.js.erb b/core/app/assets/javascripts/refinery/boot_wym.js.erb
index 6e79eba..f712ff6 100644
--- a/core/app/assets/javascripts/refinery/boot_wym.js.erb
+++ b/core/app/assets/javascripts/refinery/boot_wym.js.erb
@@ -158,7 +158,7 @@ var wymeditor_boot_options = $.extend({
+ "</form>"
+ "</div>"
- , dialogPath: "<%= Refinery::Core::Engine.routes.url_helpers.root_path %>refinery/dialogs/"
+ , dialogPath: "<%= Refinery::Core::Engine.routes.url_helpers.admin_dialogs_path %>/"
, dialogFeatures: {
width: 866
, height: 455
diff --git a/core/app/controllers/refinery/admin/dialogs_controller.rb b/core/app/controllers/refinery/admin/dialogs_controller.rb
index 564a8dc..21419f5 100644
--- a/core/app/controllers/refinery/admin/dialogs_controller.rb
+++ b/core/app/controllers/refinery/admin/dialogs_controller.rb
@@ -1,6 +1,10 @@
module ::Refinery
module Admin
class DialogsController < ::Refinery::AdminController
+ def index
+ redirect_to refinery.admin_root_path
+ end
+
def show
@dialog_type = params[:id].downcase
diff --git a/core/config/routes.rb b/core/config/routes.rb
index 9d9b71a..32c3ae8 100644
--- a/core/config/routes.rb
+++ b/core/config/routes.rb
@@ -5,7 +5,7 @@ Refinery::Core::Engine.routes.draw do
namespace :admin, :path => 'refinery' do
root :to => 'dashboard#index'
- resources :dialogs, :only => :show
+ resources :dialogs, :only => [:index, :show]
end
match '/refinery/update_menu_positions', :to => 'admin/core#update_plugin_positions'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment