Skip to content

Instantly share code, notes, and snippets.

@jhirbour
Created October 2, 2013 21:10
Show Gist options
  • Save jhirbour/6800583 to your computer and use it in GitHub Desktop.
Save jhirbour/6800583 to your computer and use it in GitHub Desktop.
In Spree: Replace t/taxon_name with category/taxon_name

Create or edit: $APP_ROOT/app/helpers/spree/base_helper_decorator.rb

Add this:

Spree::BaseHelper.module_eval do
  def seo_url(taxon)
    return main_app.categories_path(taxon.permalink)
  end
end

Add this to your routes.rb file:

get 'category/*id', :to => 'spree/taxons#show', :as => :categories
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment