Class: Notee::Post

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/notee/post.rb

Instance Method Summary collapse

Instance Method Details

#set_slugObject



10
11
12
# File 'app/models/notee/post.rb', line 10

def set_slug
  self.slug = self.title.downcase unless self.slug.present?
end

#set_titleObject



6
7
8
# File 'app/models/notee/post.rb', line 6

def set_title
  self.title = "no_title#{Notee::Post.count}" unless self.title.present?
end