Class: PostType
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- PostType
- Defined in:
- app/models/post_type.rb
Instance Method Summary collapse
Instance Method Details
#name_is_not_read ⇒ Object
9 10 11 |
# File 'app/models/post_type.rb', line 9 def name_is_not_read errors.add(:name, I18n.t("errors.article_type_already_exist")) if name == "read" end |
#sanitize_title ⇒ Object
13 14 15 |
# File 'app/models/post_type.rb', line 13 def sanitize_title self.permalink = name.to_permalink end |