Paperclip is nice but its not working on the update action. 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 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
David Beckwith
2008-Nov-09 12:06 UTC
Re: paperclip not working on update action (rails 2.1)
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 <keithn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
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 <dbitsoluti...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <keithn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Craig Jolicoeur
2008-Nov-14 16:36 UTC
Re: paperclip not working on update action (rails 2.1)
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 <cpjolico...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <dbitsoluti...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <keithn...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---