Class: Spree::PostCategory

Inherits:
Object
  • Object
show all
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

Returns:



31
32
33
# File 'app/models/spree/post_category.rb', line 31

def should_generate_new_friendly_id?
  slug.blank? || title_changed?
end

#slug_candidatesObject



35
36
37
38
39
40
# File 'app/models/spree/post_category.rb', line 35

def slug_candidates
  [
    :title,
    [:title, :id]
  ]
end