tharealpatton
2006-Jul-27 14:45 UTC
[Rails] Separating file_column upload directory by account
I''m working on an app right now that uses http://www.kanthak.net/opensource/file_column/index.html Sebastian Kanthak''s file_column plugin for file uploads. The usual directory structure it saves to is: model/attr/id/filename For my current project, I''d like to separate uploads by account so that it''s easier to monitor an account''s resource usage. So, the directory structure would be: @account_name/model/attr/id/filename (@account_name is the name of the specific account.) Ultimately, there would be one of these for each account: account_1/model/attr/id/filename account_2//model/attr/id/filename account_3/model/attr/id/filename etc. I see where these paths are built in the plugin (line 20 of file_column.rb it looks like), but I can''t figure out how to the account information in there. I have an instance variable (@account) generated in my controller that holds all the current account information. How do I get that object from my controller over to file_column which is working with classes that are subclasses of ActiveRecord::Base? Thanks in advance, PJ -- View this message in context: http://www.nabble.com/Separating-file_column-upload-directory-by-account-tf2010000.html#a5522451 Sent from the RubyOnRails Users forum at Nabble.com.
Maybe Matching Threads
- partials and instance variables for file_column
- problems with file_column plugin
- BUGS n code generated for target i386 compiling __bswapdi3, and for target x86-64 compiling __bswapsi2()
- Rails Plugins: Why to register your own functionality with send()?
- Where's the optimiser gone? (part 5.a): missed tail calls, and more...