mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 03:07:52 +01:00
Add Post model
This commit is contained in:
7
app/models/post.rb
Normal file
7
app/models/post.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
class Post < ApplicationRecord
|
||||
belongs_to :board
|
||||
belongs_to :user
|
||||
belongs_to :post_status, optional: true
|
||||
|
||||
validates :title, presence: true, length: { in: 4..64 }
|
||||
end
|
||||
Reference in New Issue
Block a user