Skip to content

Instantly share code, notes, and snippets.

@schof
Last active December 17, 2015 05:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schof/5560963 to your computer and use it in GitHub Desktop.
Save schof/5560963 to your computer and use it in GitHub Desktop.
Simple controller override
Spree::Admin::ProductsController.class_eval do
# don't try and load data before import action either
before_filter :load_data, :except => [:index, :import]
def import
# do stuff
end
end
Mystore2::Application.routes.draw do
mount Spree::Core::Engine, :at => '/'
Spree::Core::Engine.routes.prepend do
namespace :admin do
get '/products/import' => "products#import", :as => :products_import
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment