Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8783271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:47:15+00:00 2026-06-13T20:47:15+00:00

The tutorials I have been reading about using paperclip all include something like this

  • 0

The tutorials I have been reading about using paperclip all include something like this

<% form_for @product, :html => { :multipart => true } do |form| %>
  <ol class="formList">
    <!-- Other fields go here... -->
    <li>
      <%= form.label :photo, "Photo" %>
      <%= form.file_field :photo %>
    <li>
      <%= form.submit "Submit" %>
    </li>
  </ol>
<% end %>

This seems to me like you need to upload a photo before you click submit. On my site, I want users to be able to create a product, then afterwards if they want to add a photo, click on an upload photo button in the product view. Then the uploaded photo would be added to the product. Is this possible using paperclip or anything else? or do I need to have a separate photo/image model and submit it through that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T20:47:17+00:00Added an answer on June 13, 2026 at 8:47 pm

    Well even if it’s only about adding a photo to a product, you still are performing an update of the product model. So it should be a normal form for the product model like the one you posted, but without the other fields. Just make a different form view for just that add-photo process.

    You can pass a parameter like ?photo=1 to the edit action of the products resource in order to render the correct view and perhaps make that edit-action ajax-like, so it appears a bit more on-the-fly. However, the update-action of the model will not be possible to do via ajax, since your uploading an image.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been reading about dependency properties in several books but all have one
I have been reading tutorials from several different places like http://css-tricks.com/scrollfollow-sidebar/ or http://jqueryfordesigners.com/fixed-floating-elements/ and
I am currently trying to learn Android. Have been reading tutorials and manual for
I have been browsing tutorials but all are just gibberish since I do not
I have been looking at EasyMock and tutorials/examples around using it for Unit Testing
Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I have been reading several tutorials and watching some iTube videos to see how
I have been reading a lot about Double Buffering as I am working on
All, I am very new to MVC3 / jQuery combo and have been reading
I've been googling and reading about this and didn't come up with an answer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.