im tring to save the images I upload with paperclip to a specific path. I would like the Images to be saved in app/assets/image dir in the ruby on rails application, but they don't seem to go in there
this is what the path looks like in the config/environments/development.rb
config.paperclip_defaults = {
:url => ":rails_root/app/assets/images/:attachment/:id/:style/:filename",
:path => "/:class/:attachment/:id/:style/:basename.:extension"
}
I really appreciate any advice or help you can give me, if you would like more info I'll put it up as quick as I can.
here is the def create from the product_images showing how I create an image and save it
def create
@product_image = ProductImage.new(params[:product_image])
@product = @product_image.product
if @product_image.save
@product.product_image_id = @product_image.id
@product.save
redirect_to @product_image, notice: 'Product image was successfully created.'
else
render :template => "products/edit"
end
end