Class: Notee::Post
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Notee::Post
- Defined in:
- app/models/notee/post.rb
Instance Method Summary collapse
Instance Method Details
#set_slug ⇒ Object
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_title ⇒ Object
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 |