Class: Integral::Category

Inherits:
ApplicationRecord show all
Extended by:
FriendlyId
Defined in:
app/models/integral/category.rb

Overview

Represents a user post category

Instance Method Summary collapse

Methods inherited from ApplicationRecord

available_statuses

Instance Method Details

#set_defaultsObject



36
37
38
39
40
# File 'app/models/integral/category.rb', line 36

def set_defaults
  return if self.persisted?

  self.locale ||= Integral.frontend_locales.first
end

#to_paramObject



32
33
34
# File 'app/models/integral/category.rb', line 32

def to_param
  id
end