first gallery version
This commit is contained in:
@ -6,7 +6,9 @@ class Member < ApplicationRecord
|
||||
|
||||
mount_uploader :picture, PictureUploader
|
||||
has_many :stories
|
||||
|
||||
has_many :stories
|
||||
has_many :pictures
|
||||
|
||||
validates :bio, length: { maximum: 1000 }
|
||||
validates :name , length: { minimum: 3 }
|
||||
|
||||
|
9
app/models/picture.rb
Normal file
9
app/models/picture.rb
Normal file
@ -0,0 +1,9 @@
|
||||
class Picture < ApplicationRecord
|
||||
belongs_to :member
|
||||
|
||||
mount_uploader :picture, PictureUploader
|
||||
|
||||
validates :text, length: { maximum: 80 }
|
||||
|
||||
|
||||
end
|
Reference in New Issue
Block a user