Last active
December 17, 2015 05:49
-
-
Save schof/5560963 to your computer and use it in GitHub Desktop.
Simple controller override
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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