The reason i want to do that is because ia'm writing a program using Paperclip in combination that can upload your picture in different sizes. For now i have this
>def self.last_avatar > Avatar.find(:last) > end > > def self.new_avatar_size > last_avatar.avatar_size > rescue > "48x48" > end > > > has_attached_file :avatar, :styles => { :small => new_avatar_size, :large => > >"500x500>" }, This works well only there is one problem User1 choose the size of 40x40 user2 choose the size of 80x80 User2 is done before user1 In that case user1 gots the size of user2 80x80 Now i try to avoid this on severeal ways. But each time i have the problem that i can't use this way into a model. Cookies, remote_ip nothing is possible into the model. Maybe there is a way too use has_attached_file into the controller or something. -- 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@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---