Anil Wadghule
2008-Jul-18 14:58 UTC
before_thumbnail_saved - attachment_fu helper does not work
Hi, I have added these lines in my model, but it does not work. before_thumbnail_saved do |record, thumbnail| thumbnail.update_attribute(:filename, thumbnail.public_filename(thumbnail.thumbnail.to_sym)) end It keeps the filenames as if they were not touched. Basically I want to store the full image path in the database table. -- Anil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Nathaniel Bibler
2008-Jul-24 15:44 UTC
Re: before_thumbnail_saved - attachment_fu helper does not work
You should probably post this question to the attachment_fu Google Group instead of the general Rails group: http://groups.google.com/group/attachment_fu That being said, I''m seeing the same issue with Rails 2.1 and the most recent version of attachment_fu, pulled from Subversion (revision 3183). The after_resize callback is working fine, but the before_thumbnail_saved callback doesn''t appear to be called, at all. Nate On Jul 18, 10:58 am, "Anil Wadghule" <anildigi...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi, > > I have added these lines in my model, but it does not work. > > before_thumbnail_saved do |record, thumbnail| > thumbnail.update_attribute(:filename, > thumbnail.public_filename(thumbnail.thumbnail.to_sym)) > end > > It keeps the filenames as if they were not touched. > > Basically I want to store the full image path in the database table. > > -- > Anil--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---