similar to: file_column: changing default store_dir

Displaying 20 results from an estimated 1000 matches similar to: "file_column: changing default store_dir"

2006 Jan 04
4
file_column
I use file_column and it works fine. I tried to change the store_dir to a the path I want my files to be stored and not the default. I stored some images fine. But when I try to reach my images it seems like file_column uses the model_name/attribute_name on the image and not the store_dir I used. How can I change this ? Thanks in advance -- Alexander Antonakakis
2006 Jan 17
0
file_column with both root_path and store_dir
I store my file_column database outside of my RAILS_ROOT. It seems to work in real life, but not in tests. In the tests, I can''t set both the root_path and the store_dir. In tests, setting the store_dir option will override the root_path option. The only way for root_path to work is to remove store_dir. I think the problem is in file_column.rb on line 22: options[:store_dir]
2006 Apr 14
1
file_column and custom store_dir
I''m using file_column to store mulitple versions of an image in a custom directory "images/artwork/" with the :store_dir option. This is working fine for uploading and storing the images, but whenever I try and access the images with the url_for_file_column helper it keeps generating the default path. I thought it would replace this by default, but it doesn''t seem to.
2006 Mar 02
2
url_for_file_column not returning correct path
I added this test towards the end of the included file_column_helper_test.rb that shipped with the file_column plugin: def test_url_for_file_column_different_root_path Entry.file_column :image, :root_path => File.join(RAILS_ROOT, "public/files") e = Entry.new(:image => upload(f("skanthak.png"))) assert_match %r{/public/files/entry/image},
2006 Mar 23
5
Filecolumn storage location
Hi, I am using file_column for some image uploading. I want to have all the images stored under one root which I have managed by setting the :store_dir option as below. file_column :filename, :store_dir => File.join(RAILS_ROOT, ''public'', ''images'', ''products'') So, my images get uploaded to: /public/images/products/<primary_key>
2006 Nov 04
0
Having problems with edge rails
I just switched to Edge Rails (revision 5207) since I want to use the BigDecimal support for an e-commerce website.. Unfortunately, some of my old code seems to be breaking things.. First off, it looks like my "skip_before_filter :check_authentication, :check_authorization, :only => [:login, :forgot_password]" doesn''t work at all, since the before_filter gets executed for
2005 Dec 23
6
file_column and HABTM
I have several models that will be using file_column by way of the "Picture" class (HABTM). Right now, all pictures are stored in: public/picture/image/1/filename1.jpg public/picture/image/2/filename2.jpg Is there a way I can dynamically define the "store_dir" based on the model? For example, if I have "user", "product" and "place" models all
2006 Jul 03
1
staying in control over the case in file_column plugin
using file_column plugin, if I upload IMG0001.JPG, I get files similarly named IMG0001-thumb.JPG, etc. but if I upload img00002.jpg, I get files img00002-thumb.jpg, etc. This is tacky in terms of my counting on a consistency when implementing views. My inclination is to start hacking away at this section of file_column.rb: class PermanentUploadedFile < RealUploadedFile # :nodoc: def
2006 Aug 04
1
file_column issues on dreamhost
ok, here''s the deal. I''m having an issue using the file_column plugin on dreamhost. Everything works great on my local dev machine using webrick. On dreamhost i have no errors, but initially the uploaded images where stored in /public/user/...etc... When the image should have displayed I just got the filename instead. I though it might be a routing issue, so I tweaked the
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
2006 Aug 23
0
Rotating Images with file_column
Hi everyone, I have a photo site that I''m making and I''m using file_column to handle the auto-generation of several "version" of each photo: essentially thumbs and fuller-sized version. The full sized versions retain the original''s proportions, whereas the thumbs are all 4:3. This means most of the thumbs are cropping the original. This all works great, but I
2012 Nov 06
0
How to get which check boxes has beed unchecked and remove Subscription for them?
I have following subscription creating system, right now when I`m selection available subscription groups(Marketing, Sales) action Save Subscription create this two subscriptions: @subscriptions = current_user.subscriptions > @apps = App.all > if request.post? > if params[:subscription] and params[:subscription][:app_id] > params[:subscription][:app_id].each do |app_id| >
2008 Mar 21
3
Problem with user regsitration and ldap on SVN version
Hi guys, I'm trying to use Asterisk with LDAP integration. I created some schemas and it seems to work fine for sip.conf replacement. When I try to register a softphone to test the service, it seems ok from the softphone point of view (user registred) but when I do a "sip show peers", no one is registered (nor sip show subrscriptions, users...) I put my Asterisk on full debug and I
2015 Oct 14
2
Use repadmin /showobjmeta would caused samba 4.3.0 fault
I had a AD with 4 Win2003 DC. Now I use a samba4 server as a additional DC. Samba4 server system version: ubuntu 15.04 Samba version: samba 4.3.0 The replication from win2003 DC to samba4 DC was success. But have some problem from samba4 DC to win2003 DC. I can run "samba-tool drs showrepl" without error. But in log.samba it can found many message like: [2015/10/09 12:53:11.562088, 0]
2008 Mar 21
1
----www.cdsportal.net---- wholesale voip provider
Why pay 1.1 cent's a minute for interconnecting to another Asterisk server for a high volume call center. Do people really understand what they are trying to sale and take an honest look into what they advertise. As a high volume user like a call center I would not connect my Asterisk Box to there Asterisk Box to a third Sip provider who then hands of to the Level 3 and so forth. With LD
2013 Apr 08
1
cattr_accessor and Thread.current prblems
Hello, I am trying to convert three applications to multitenant, all of them have same structure difference is only in little functions and template designs. All of them using cattr_accessor for setting currencies and other data, and it works perfectly Now i added app_id as cattr_accessor to App model to use it in default_scope to implement multi-tenancy class App < ActiveRecord::Base
2006 Jan 09
7
File_column Dynamic directory
I asked this question earlier and did recieve 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
2006 Jun 10
0
Dynamic file paths in FileColumn
I have a file uploader application in ROR using the very nice FileColumn plugin. In looking at the source code I can see that there is a DEFAULT_OPTION hash with some root path options and such which can be merged from an options paramater. These static path changes are not a problem. My question is dynamic path options. My upload form, when you boil it down, has two fields. The first is
2009 May 03
1
Localizing attributes when using I18n
Currently I''m developing a multilingual app on rails 2.2. I liked very much the idea of Xavier Defrang to provide a locale-aware accessor for the fields that needs a translation: http://defrang.com/articles/2005/12/02/playing-with-rails-i18n I modified code a little to make it work with rails 2.2: def self.localize(*attribute_names) attribute_names.each do |attribute_name|
2006 Jun 17
0
Dynamic forms containing collections
Hiall, I have the following problem: I need to use forms containing collections (i will call them FCC), and I want to construct them dynamically, as I need to deal with quite large forms (more than 600 input fields). The variables @model_name and @field_name contain the proper model and field names as strings, which is enough for "normal" form input fields. (i.e. the "if