similar to: file_column with both root_path and store_dir

Displaying 20 results from an estimated 120 matches similar to: "file_column with both root_path and 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 Feb 20
2
file_column: changing default store_dir
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
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 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
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 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},
2005 Dec 29
3
FileColumn Help
i''ve changed store_dir to :store_dir => "public/uploads/users/pictures/" that works great for uploading, but url_for_file_column is still outputting: /user_picture/image/id/name.jpg how do i make url_for_file_column output the correct url? -- Posted via http://www.ruby-forum.com/.
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 Sep 26
0
Code coverage of a rails plugin
Guys I''ve been struggling with this one for a couple of hours, and nothing seems to work here, any advice would be duly appreciated... Background: I''m busy working on a plugin called "shared_models", allowing you to easily share models between different applications, running different database or on the same database. The plugin is nearly complete, offering a
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
2007 May 28
1
upload_column problems on post after validation error
Hi to all the crew ! I''ve a little (big ?) problem. I''m using upload_column plugin, it works very well but it throws an exception when I try to repost the form after a validation error. Here some details: Model: (hostel.rb) HOSTEL_PHOTO_DIR = Proc.new {|inst, attr| "hostel/#{inst.id}"} HOSTEL_PHOTO_THUMB = "100x100" HOSTEL_PHOTO_NORMAL =
2006 Jan 17
3
file_column :root_path question.
I''m developing on Windows and deploying to FreeBSD+lighttpd using Switchtower and I''ve got things generally working. My problem now is that file_column data gets zapped every time I deploy, because Switchtower creates a whole new myapp/public directory with each rev. I looked through the file_column docs and found the :root_path option, which I use in my models as follows:
2006 Jan 27
9
RedCloth Hard Breaks
Has anybody gotten :hard_breaks to work with RedCloth? I''m doing: self.body_html = RedCloth.new(self.body).to_html(:textile) which works, except that it doesn''t transform hard breaks to <br /> tags, which is really important for me. However, if I do: self.body_html = RedCloth.new(self.body, [ :hard_breaks ]).to_html(:textile) then it converts ALL breaks into <br
2005 Nov 18
10
[Request] file_column configurability
I wasn''t sure where to email this request, so I am hoping the author of file_column actually sees this. I was wondering if there were any plans to allow some configurability in the file_column plugin. By configurability I mean allowing the developer to define which table column is used as the unique identifier when creating image folders. Right now it seems like it uses the ID of the
2006 Jun 28
6
file_column plugin. Storing files outside RAILS_ROOT
I also posted this on Rails Engines forum. Sorry for the double post. I am trying to configure file_column plugin so that it stores the images in a directory completely outside of RAILS_ROOT. I have no problems in storing the files by setting :root_path option. But I can''t get to display these images using ''url_for_file_column''. What I get instead of the image is
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
2009 Dec 02
14
root_path and root_url undefined
Hi all, I''ve just started working on another RoR project after a couple of months away. I''m having trouble with named routes, specifically root_* In previous apps I''ve used root_path and root_url without any problems, but in this project (2.3.2 - the same as my last project where I used it) it comes up undefined. I''ve double and triple checking my routes.rb,