You can try to use the enclosed resources. I'm not quite sure about the structure of your application, but in general, using attached photos will look something like this:
routes.rb
resources :photos do resources :photos end
photos_controller.rb
before_filter :find_parent_photo, :only => [:new, :create] def create @photo = Photo.new params[:photo] if @parent_photo.present?
new.html.haml
= form_for [@parent_photo, @photo] do |f| -
earlier, when you wanted to add a link to create a photo, you wrote something like this
= link_to "new photo", [:new, :photo]
now if you want to add a link to create a photo based on foto @photo1
= link_to "new photo based on other one", [:new, @photo1, :photo]
binarycode
source share