Hi Tony, Rails is telling you that your "upload_avatar_user_path(@user, :format => 'js')" method call is not generating a correct route.
A couple things come to mind that could help to resolve the issue: 1) Make sure that you have defined the resource in your config/ routes.rb map.resources :users, :member => { :upload_avatar => :put } 2) Make sure that the @user instance variable is not nil. I'd probably need to see more code to help further. Lake On Mar 25, 12:10 am, Tony Augustine <li...@ruby-forum.com> wrote: > hi when i tried to runone of my file upload application in > rails i am getting an error lik this. can any one please help > mme? > > ActionView::TemplateError (upload_avatar_user_url failed to generate > from {:format=>"js", :action=>"upload_avatar", :controller=>"users", > :id=>nil}, expected: {:action=>"upload_avatar", :controller=>"users"}, > diff: {:format=>"js", :id=>nil}) on line #2 of > app/views/lists/_import.html.haml: > 1: .remote > 2: - form_for(@user, :url => upload_avatar_user_path(@user, :format => > "js"), :html => { :multipart => true, :target => "uploading", :onsubmit > => "$('user_submit).disabled = true" }) do |f| > 3: = link_to_close avatar_user_path(@user) > 4: .section > 5: %small > -- > Posted viahttp://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.