Add posts, tags, tagging, to database. Create references to align with new DB model. Add image of mermaid template model.
This commit is contained in:
parent
881cafdb05
commit
663c583a51
17 changed files with 154 additions and 2 deletions
|
|
@ -1,5 +1,8 @@
|
|||
class Image < ApplicationRecord
|
||||
has_one_attached :file
|
||||
|
||||
has_many :taggings, as: :taggable
|
||||
has_many :tags, through: :taggings
|
||||
|
||||
validates :title, :file, presence: true
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue