From: Thiago Massa Date: 2010-07-05T11:33:44+09:00 Subject: Re: redirect_to(user_contacts_path(@current_user)) error --0016363ba0ded1841f048a9ac3d6 Content-Type: text/plain; charset=ISO-8859-1 Couldn't find Contact without an ID 2010/7/4 Kenneth > can you provide the error message??? > > also you can dry your code a little bit... > > if params[:commit] == "upload and import contact" > if params[:import_file].nil? > flash[:notice] = 'No file was attached.' > p user_contacts_path(@current_user) > p @current_user.contacts > else > parse_vcard_file(params[:import_file], params[:user_id]) > flash[:notice] = 'Contact was successfully created from VCard > file.' > end > redirect_to(user_contacts_path(@current_user)) > else > > end > -- > Posted via http://www.ruby-forum.com/. > > -- Thiago Fernandes Massa 11 83979414 --0016363ba0ded1841f048a9ac3d6--