similar to: limiting options in file_upload

Displaying 20 results from an estimated 2000 matches similar to: "limiting options in file_upload"

2006 Apr 01
4
Saving images in shared directory w/ Capistrano/SVN?
Hi all, I''m using Capistrano and SVN to version control and deploy, but I''m not sure what to do about my images directory. I use file_column and RMagick to save images to the disk under a model called "Image", and they''re saved in public/image/... etc. Each time I deploy a new version, my image folder doesn''t exist anymore. I don''t want
2006 Mar 22
3
Problems with validates_presence_of...anybody?
Hello everybody, I have been developing small applications in Rails from quite some time. But lately, I came across a bug which I have not been able to correct. If anybody could help me with it, would be of great help thankyou. Actually, the problem is that I have a form in my application with some set of fields. Now what "validates_presence_of" should do is that if I submit the form
2006 Mar 22
5
foreach item in column
Hi there, I have a database with phonenumbers, and I want to make a function that runs a command for each of these numbers, with the number as an argument Something like this in Perl: system("/bin/command $number"); mysql> select * from numbers where list = "one" +----+----------+----------+---------------------+-----------+ | id | number | name | email
2006 Jun 23
2
polymorphic challenge
Hello All, I have a little challenge and I am not sure if this is even possible I am working on a dating/event site and few functionalities are similar that I want to centralize them. We have users which can have - favorite users - interest list - blocked users All these relations are like; User <-> Relation <-> User I was thinking I could have a class called Relation (with a
2006 Jan 11
1
fiile_column persistent across different forms
is there a way to keep the file_column field in the form persistent across diffferent view templates ? In my controller (same controller for both views) i do @post = Post.new in the view i do form_step1.rhtml --------------------- <%= file_column_field "post", "image" %> <% if @post["image"] %> <%= image_tag url_for_file_column("post",
2006 Jun 18
10
acts_as_enumerated
Hello All, Any one using acts_as_enumerated? I need help using (I like that it caches values in memory) I am working on a dating website and there are lots of options I want to store as enumerated like Status; divorce, single, Sex: male, female Eye color; blue, brown, green.... and lots more.... But I do not wanna keep them in seperate tables, and wanna keep them all together. Anyone has a
2005 Dec 14
3
image upload (apache2.0+ lighttpd)
Hello all, I use lighttpd 1.4.8 and I have a problem with image uploads. I tried file_upload plugin, but it is strangely working sometimes and refuse to work sometimes. Function in the controller is (@user is loaded in before_filter) def update_watermark @user.watermark = params[:user][:watermark] @user.save redirect_to :action => "index" end Model is
2006 Jan 23
3
Clearing a file_column-type field
So I am now able to set/upload an image to my app using file_column, with a little bit of a change to the code. I can change the image using an Edit page, but I''m trying to figure out what to do if the user wants to remove the image. I tried adding a Remove Image link in my list, but I''m not sure what to do in the remove_image method in my controller. I tried setting the
2006 Jan 26
4
Override has_many :order at run-time?
Is it possible to override has_many''s :order attribute at run-time? e.g. something like: <% for category in @site.categories(:order=>''name'') %> ... <% for category in @site.categories(:order=>''rank'') %> ... thanks csn -- Posted via http://www.ruby-forum.com/.
2007 Feb 01
2
file_column 2nd try....
Looks like my first question a couple of days ago wasn?t very clever asked, at least very sucessfull.... So, anyway...i will try it again: I have to prefix that I am far away from fully understanding the overall concept yet, and there?s no way to get some hints in the www so far, at least my resaerches dont lead to any helpfull stuff. image_controller.rb: def create MiddleMan.new_worker
2006 Jan 20
8
validates_confirmation_of not working
is there any special requirement for validates_confirmation_of ? I am trying to make sure 2 passwords are equal (cleanly the rails way).. In my view i have two fields with id user[password] and user[password_confirmation]. in the model i have validates_confirmation_of :password, :message =>"Passwords do not match " Am i missing something here ? thanks adam
2006 Mar 15
1
file_column imagemagick strangeness
Hi, I''m using the basic magick features of file_column, and while files are uploading fine without the magick options, as soon as I do something like :magick => { :size => "400x600" } I get an ''invalid file'' error. Further investigation reveals that the file is in fact invalid because something somewhere is truncating the file path:
2006 May 09
2
handling file upload onto local filesystem.
Hi, I have a multipart form upload field uploaded through <%= file_field("profile", "profile") %> Once a submit happens, the action basically does something like: profile = Profile.new(params["picture"]) This invokes the models = to method: def picture=(picture_field) ...do a bunch of assignments here end def validate ... do a bunch of validations
2006 Jun 07
2
Qick Q: Expression in this Controller
I tried putting this inside my controller: def goodbye @link = Link_to "goodbye!", :action =>"goodbye" end and display it in my views calling the @link variable. Of course it doesn''t work. Why? Thanks -- Posted via http://www.ruby-forum.com/.
2006 Jan 10
3
Serving lots of images to only registred users
Hello guys, I am building a photo website and I have some questions before I really start programming the site. My system will be Debian + lighttpd + mysql +fastcgi + ImageMagick I plan to use file_column for image handling/verification and thumbnail creation. My question is; I need to store images in a place outside of webroot so only registered members can see them. To serve them secure
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},
2007 Dec 27
4
validates_file_format_of only when is there an image
i have a model with this: file_column :image validates_file_format_of :image, :in => ["gif", "png", "jpg"] If inthe form the user not insert the image i receive an error. If i remove: validates_file_format_of :image, :in => ["gif", "png", "jpg"] it works. Is possible do the validation only when user insert the image in form? i
2006 Jan 19
4
validates_presence_of
I am just going through the book and I come across a problem with the code in the app/models: validates_format_of :image_url, :with => %r{^http:.+\.(gif|jpg|png)$}i, :message => "must be a URL for a GIF, JPG, or PNG image" It seems to moan when it''s empty even though I removed :image_url from validates_presence_of. How should I make it optional?
2006 Apr 30
4
Subversion and Capistrano
I have a project under Subversion, deployed by Capistrano. When it is deployed, obviously I need to deploy "real" copies of database.yml, deploy.rb, and maybe a couple of other files. But if I offer it for public checkout, I obviously do not want these files as part of the checked out code. What''s the best way to handle this? --Al Evans -- Posted via
2006 May 04
5
How to upload only jpeg & gif & png images into public/images using rubyonrails
Hello iam new to rubyonrails. Please any one help me out in "How to upload only jpeg & gif & png images into public/images using rubyonrails" Thanks in Advance -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060504/33a17ad2/attachment.html