Rails 3, nested resource, No route matches [PUT]?

You don't need to specify the URL, which was wrong for the update anyway. Try.

You don't need to specify the URL, which was wrong for the update anyway. Try {:multipart => true}) do |f| %.

Answer off top of my head. I don't have working example, but hope it helps. In deed, according to your rake routes, you don't have a route: PUT "/galleries/1/photos" If I'm not mistaken, your form points to invalid action: gallery_photos_path will return an index of photos in gallery with id :gallery_id.

I think, :url parameter of the form should be something like: :url => gallery_photo_path(params:gallery_id, params:id) OR you can specify it without using Rails helpers: :url => "/galleries/#{params:gallery_id}/photos/#{params:id}" Also, if you are trying to create nested resource, I don't think you need these lines in your routes file: resources :galleries resources :photos.

If I remove those lines and I go to /galleries/1/photos/1/edit I get this error: No route matches {:action=>"show", :controller=>"photos", :format=>nil, :id.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions