Add image to budget investments.
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
534aa4146e
commit
c5bb6dca65
@@ -30,6 +30,9 @@ class Budget
|
||||
has_many :comments, as: :commentable
|
||||
has_many :milestones
|
||||
|
||||
has_attached_file :image, styles: { large: "600x600>" ,medium: "300x300>", thumb: "100x100>" }
|
||||
validates_attachment_content_type :image, content_type: /\Aimage\/.*\z/
|
||||
|
||||
validates :title, presence: true
|
||||
validates :author, presence: true
|
||||
validates :description, presence: true
|
||||
|
||||
Reference in New Issue
Block a user