diff options
Diffstat (limited to 'app/models/blog.rb')
-rw-r--r-- | app/models/blog.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/blog.rb b/app/models/blog.rb index e43990e..362f69f 100644 --- a/app/models/blog.rb +++ b/app/models/blog.rb | |||
@@ -11,6 +11,8 @@ class Blog < ApplicationRecord | |||
11 | validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published | 11 | validates :slug, presence: true, format: /\A[-a-z0-9]+\z/, if: :published |
12 | validates :user, presence: true | 12 | validates :user, presence: true |
13 | 13 | ||
14 | has_many_attached :images | ||
15 | |||
14 | before_validation :set_draft_title | 16 | before_validation :set_draft_title |
15 | before_save :set_published_at | 17 | before_save :set_published_at |
16 | 18 | ||