How can you get a variable from the view into the model


I am using the attachment_fu plugin to generate thumbnails and save
images into the file system. I want to create a folder in public/
images and then save all the images including thumbanils there.
So far I can create a new folder and save images. However, I cannot
save the images into a specific subfolder.
I want to create a variable and set it as using a text field in the
view, then upload files into a folder named after whatever is in the
text field. using attachemtn_fu the save path is set using:

def full_filename(thumbnail = nil)
  file_system_path = (thumbnail ? thumbnail_class :
  File.join(RAILS_ROOT, file_system_path,

Does anyone know how I can get a variable from the view inbetween
'attachment_options[:path_prefix]' and 'to_s' in the model?

kind regards

Tim Fernandez