Can i put more than one image on paperclip model? and how should i put it ?
rails g migration add_image_to_model_name
def self.down
remove_attachment :model_name, :image, :image2
end
def self.up
remove_attachment :model_name, :image, :image2
end
end
Best way is to create new table for paperclip attachments and setup
has-manyassociation between this table and your parent/existing table.With this approach, you can upload images as many you need.
Create
picturemodel and migration file, then define paperclip'shas_attached_fileinpicturemodel.Here is a tutorial you can refer to: Adding multiple images to a Rails model with paperclip