I figured it out.
Stupid, but I forgot to add :avatar to the list of attributes. So it
was protected from mass_assignment.
On Nov 14, 10:42 am, Dr J <[EMAIL PROTECTED]> wrote:
> I am having the exact same issue as well.
>
> At first I thought it was something with my Amazon S3 setup, so I
> removed all the S3 stuff and tried it with the file system settings
> and I'm having the same result. No errors are thrown by paperclip but
> its just not working.
>
> The file does appear to be getting submitted via the form:
>
> "avatar"=>#<File:/var/folders/qU/qUtWQXmZFhincA4TKuqR4++++TI/-Tmp-/CGI.
> 13460.11>,
>
> but nothing happens afterwards and I cant access it via
> model.avatar.url, etc...
>
> btw, I'm on Rails 2.1.1
>
> On Nov 9, 7:06 am, David Beckwith <[EMAIL PROTECTED]> wrote:
>
> > I have
>
> > form_for (@user, :html => {:multipart => true}) do |f|
>
> > and paperclip not working.
>
> > I noticed:
>
> > Parameters: {"user"=>{"profile_pic"=>#<File:/tmp/CGI.1316.5>
>
> > It seems to be uploading to /tmp, but it doesn't get copied over to
> > RAILS_ROOT/public/profile_pic like I'm expecting it to.
>
> > Does anybody know what might be wrong?
>
> > BTW, I'm using Rails 2.1.0 with paperclip from the github repository.
>
> > David :)
>
> > On Sep 28, 11:48 am, Keith <[EMAIL PROTECTED]> wrote:
>
> > > Remember to attach :html => { :multipart => true } to your form_for
> > > declaration for both the new.html.erb and edit.html/erb
>
> > > On Sep 7, 1:14 am, bingo bob <[EMAIL PROTECTED]> wrote:
>
> > > > Paperclipis nice but its not working on theupdateaction.
>
> > > > Well, to be exact, I can attach new picture records via a scaffolded
> > > > controller and edit them, but the edit controller loses them when the
> > > > record is updated?
>
> > > > Is this a known issue?
> > > > --
> > > > 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 [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
-~----------~----~----~----~------~----~------~--~---