spree-contrib / spree_editor

Rich text editor for Spree with Image and File uploading in-place.
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
112 stars 183 forks source link

Incorrect configuration path generation 3-0-stable #98

Closed gamecreature closed 9 years ago

gamecreature commented 9 years ago

There seems to be an issue with the link generation. When I click the tab to the configuration screen., I get an ActionController::RoutingError (No route matches [GET] "/admin/editor_settings")

The file /app/overrides/add_rich_editor_tab.rb contains the following

Deface::Override.new(
  virtual_path: 'spree/admin/shared/sub_menu/_configuration',
  name: 'add_rich_editor_tab',
  insert_bottom: '[data-hook="admin_configurations_sidebar_menu"]',
  text: '<li<%== " class=\"active\"" if controller.controller_name == "editor_settings" %>><%= link_to Spree.t(:rich_editor), spree.admin_editor_settings_path %></li>'
)

I guess the link spree.admin_editor_settings_path should be spree.edit_admin_editor_settings_path

The workaround I use for now is the following in my routes.rb which redirects the 'incorrect' path to the existing path.

get "/admin/editor_settings", to: redirect("/admin/editor_settings/edit")

I'm using the following environment: spree_editor: branch 3-0-stable spree: branch 3-0-stable rails: 4.2.0 (Ruby version 2.2.0)

futhr commented 9 years ago

@gamecreature Thank you for notice this, it has now been fixed in 3-0-stable and master branch.

gamecreature commented 9 years ago

Nice! Thank you!