У меня есть модель с 3 насадками, пожалуйста, помогите мне СУХОЙ.
class Somename < ActiveRecord::Base
has_attached_file :picture, :url => "/uploads/p/:id/picture.:extension"
validates_attachment_presence :picture
validates_attachment_content_type :picture, :content_type => ['image/jpeg', 'image/png']
has_attached_file :another_picture, :url => "/uploads/p/:id/another_pictures/:style/another_picture.:extension",
:styles => { main: '720x480#', small: '480x311#' }
validates_attachment_presence :another_picture
validates_attachment_content_type :another_picture, :content_type => ['image/jpeg', 'image/png']
has_attached_file :last_one, :url => "/uploads/p/:id/last_one.:extension"
validates_attachment_presence :last_one
validates_attachment_content_type :last_one, :content_type => ['image/jpeg', 'image/png']
end
Особенно проверяет. Почему я не могу сделать что-то вроде этого:
validates_attachment_presence :picture, :another_picture, :last_one
Спасибо!