Created
January 25, 2013 19:56
-
-
Save ehoch/4637341 to your computer and use it in GitHub Desktop.
How Alarm Grid (https://www.alarmgrid.com) created a flat taxon structure.
This file contains hidden or 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
module Spree | |
Taxon.class_eval do | |
def set_permalink # No longer add in parent | |
self.permalink = name.to_url if permalink.blank? | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This plus a new route let's us have urls such as
https://www.alarmgrid.com/browse/wireless-security-systems