Forum: Ruby on Rails How can you get a variable from the view into the model

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
fernando (Guest)
on 2007-07-17 00:34
(Received via mailing list)

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
This topic is locked and can not be replied to.