Class: Topic

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document
Defined in:
app/models/topic.rb

Instance Method Summary collapse

Instance Method Details

#generate_slugObject



14
15
16
17
# File 'app/models/topic.rb', line 14

def generate_slug
  return true unless self.slug.to_s.blank?
  self.slug = self.title.to_slug
end