File_column plugin is great. I need to change the default :store_dir
from the dynamic "model_name/attribute_name" to an equally dynamic
"client_id/app_id/model_name/attribute_name". In my model I have:
class Component < ActiveRecord::Base
belongs_to :component_type
belongs_to :component_group
breakpoint
file_column :content,
:magick => { :versions => { "thumb" =>
"100x100",
"medium" =>
"640x480>" }},
:store_dir =>
"#{client_id}/#{app_id}/#{model_name}/#{attribute_name}"
end
How can I get the 4 dynamic variables that I need into the model ''the
ruby/rails way''? client_id and app_id are determined by the
user''s
log in and could be stored in the session or passed in somehow.
Thanks!