Skip to content
This repository


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Changed product-taxon relationship to has many through to allow for ordering within a taxon

branch: master

Fetching latest commit…


Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 README
Octocat-spinner-32 README.markdown
Octocat-spinner-32 Rakefile
Octocat-spinner-32 ordering_in_taxons_extension.rb
Octocat-spinner-32 ordering_in_taxons_hooks.rb

= Ordering In Taxons

Simple, untested extention to order products within a taxon (thereby controlling which show up on the front page of a taxon page).

Changes include:

  • new "product_taxons" table with migration and ProductTaxon class with position column, acts_as_list :scope=>:taxon
  • changed product.taxons to has_many :through from has_and_belongs_to_many
  • overrode Product.available named scope to add include=>:product_taxons, :order=>'product_taxons.position'
  • added sortable list of products to the taxon edit page (right click the taxon and choose edit to get there)
Something went wrong with that request. Please try again.