Class: Spree::PostCategory
- Inherits:
-
Object
- Object
- Spree::PostCategory
- Extended by:
- FriendlyId
- Includes:
- Metafields, SingleStoreResource
- Defined in:
- app/models/spree/post_category.rb
Instance Method Summary collapse
Instance Method Details
#should_generate_new_friendly_id? ⇒ Boolean
31 32 33 |
# File 'app/models/spree/post_category.rb', line 31 def should_generate_new_friendly_id? slug.blank? || title_changed? end |
#slug_candidates ⇒ Object
35 36 37 38 39 40 |
# File 'app/models/spree/post_category.rb', line 35 def slug_candidates [ :title, [:title, :id] ] end |