diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-16 10:10:29 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-10-16 10:10:29 -0400 |
commit | d7dbb6519629db02447d95237ef7e8f6aa84d10a (patch) | |
tree | deaeefd5c67b6ce4902c664342d227318023e585 /app | |
parent | 0987c239974f6f875edcf15539c0bf0d85bd1f23 (diff) | |
download | thoughts-d7dbb6519629db02447d95237ef7e8f6aa84d10a.tar.gz thoughts-d7dbb6519629db02447d95237ef7e8f6aa84d10a.tar.bz2 thoughts-d7dbb6519629db02447d95237ef7e8f6aa84d10a.zip |
Added ActiveStorage (but I'm not using it yet)
Diffstat (limited to 'app')
-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 | ||