> Hi Jodi,
>
> Thanks for the reply. I tried adding the additional table relationships
> as you suggested but I'm getting an error on the user update action:
> undefined local variable or method `filename' for #<User:0x2564508>
>
> I have the standard update code in my controller:
>
> def update
> @user = User.find(params[:id])
>
> respond_to do |format|
> if @user.update_attributes(params[:user])
> flash[:notice] = 'User was successfully updated.'
> format.html { redirect_to(@user) }
> format.xml { head :ok }
> else
> format.html { render :action => "edit" }
> format.xml { render :xml => @user.errors, :status =>
> :unprocessable_entity }
> end
> end
> end
>
> and the view code for the upload is:
> <%= file_field_tag :uploaded_data %>
>
> Any help is appreciated! Thanks.
>
> -Tony
I know this is an old post, but I was trying to find the solution to:
undefined local variable or method `filename'
and I arrived here.
I got this error because I made a mistake creating the table. I used
"file_name" instead of "filename". Changing this solved the problem for
me.
Cheers
Aukan
--
Posted via http://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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.