Class: MechanizeStore::ProductCategory

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/mechanize_store/product_category.rb

Instance Method Summary collapse

Instance Method Details

#create_slugObject



16
17
18
# File 'app/models/mechanize_store/product_category.rb', line 16

def create_slug
  self.update_attributes(:slug => self.name.parameterize)
end

#set_defaultsObject



12
13
14
# File 'app/models/mechanize_store/product_category.rb', line 12

def set_defaults
  self.slug = self.name.parameterize
end