Class: Guts::Category

Inherits:
ApplicationRecord show all
Extended by:
FriendlyId
Includes:
MultisiteScopeConcern, NavigatableConcern
Defined in:
app/models/guts/category.rb

Overview

Category model

Instance Method Summary collapse

Instance Method Details

#should_generate_new_friendly_id?Boolean

Updates slug if title changes

Returns:

  • (Boolean)


21
22
23
# File 'app/models/guts/category.rb', line 21

def should_generate_new_friendly_id?
  title_changed?
end