Module: Spree::TaxonDecorator

Defined in:
app/models/spree/taxon_decorator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.prepended(base) ⇒ Object



3
4
5
6
# File 'app/models/spree/taxon_decorator.rb', line 3

def self.prepended(base)
  base.after_create :update_temp_permalink_to_id
  base.after_destroy :touch_parent_on_destroy
end

Instance Method Details



8
9
10
# File 'app/models/spree/taxon_decorator.rb', line 8

def set_permalink
  self.permalink = generate_slug
end