On Aug 17, 2011, at 2:51 AM, Ben SV wrote: > Hi, > > Firstly I'm new to Ruby, Rails & Hobo so please forgive me if this is > a trivial question. > > I'm using paperclip to attach files and I would like to set the upload > URL to reflect variables within the model, shown below: > > class Gmeeting < ActiveRecord::Base > > hobo_model # Don't put anything above this > > fields do > title :string, :required > speaker :string, :required > talkdate :date, :required > abstract :text > timestamps > end > > has_attached_file :presentation, :path => ":rails_root/public/group- > meetings/SPEAKER/DATE/:basename.:extension" > end > > In the path variable can I make SPEAKER equal the speaker field and > DATE equal the talkdate field?
You should be able to set up interpolations to do this: https://github.com/thoughtbot/paperclip/wiki/Interpolations --Matt Jones -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
