search for: dynamic_dir

Displaying 5 results from an estimated 5 matches for "dynamic_dir".

2006 Jan 09
7
File_column Dynamic directory
...cieve an answer but I am not sure Ifully understood the answer as I am getting all sorts of errors when trying to implement. Basically I want to add a layer to the path for my files. I have the following set up in my model class: file_column :image, :store_dir => :dynamic_dir def dynamic_dir File.join(field_options[:root_path], "picture",@user.username, "image") end When I run the app I recieve the following error: undefined method `to_str'' for :dynamic_dir:Symbol This is the code that Kyle sent me in reply to my original...
2006 Feb 26
0
file_column issues
I am having some strange issues with file column today. This goes back to something that I was working on before and successfully have it working on my development box however it is not working on my staging machine. I have a dynamic_dir action set up for file_column that is called via the :store_dir => :dynamic_dir the action is this: def dynamic_dir File.join("data","files",self.user_id.to_s,"image") end This works perfect on my development machine however when I loaded the code u...
2005 Dec 20
3
File Column Directory Add another layer
Quick Question. I understand how to change the default path to something other than public but what if I wanted to add another directory into the equation. I want to upload an image into the following structure: /public/image/userid/imageid/test.gif So basically I want to look up the userid in my users table and put all the images for that user in the same directory. So i have a one
2006 Mar 16
2
Questions about file_column plugin
Hi! I''ve got 2 models - let''s call them User and Image. User has_many images. (Thanks to Mark Reginal James :) ) I have a single form where i can create a user and add to him any number of images, which are uploaded using file_column plugin. Now 3 questions: 1. How to change the default path where file_column plugin saves images, so it will save them in a directory, which
2006 Feb 26
1
Ruby on Rails and Fedora Core 4
...ve noticed two things so far that are acting odd, first is that acts_as_tree does nothing of the sort. I had a call to object.parent.name and it croaked saying that parent was not a valid method for class object. The second wierd thing is mentioned in a previous email tonight. That having a dynamic_dir set up for file_column complains: ArgumentError (dynamic_dir'' is not an instance method of class File): Is there something wierd going on with Fedora? or is it just some weird gremlin in the system that is causing errors to appear when they never existed before? Any thoughts? Tha...