similar to: validates_format error

Displaying 20 results from an estimated 4000 matches similar to: "validates_format error"

2006 Jun 14
1
file column validates_format_of
Been manually testing file column with success except it seems to upload the file before validating it. Also .pdf files (which shouldn''t even validate) crash WEBrick. What am I missing to solve these problems? (apart from a brain!) validates_presence_of :title, :file validates_format_of :file, :with => %r{.(gif|jpg|png)$}i, :message => "File must end with .jpg, .gif or
2006 Feb 21
4
File_Column w/ Dynamic Sizing
I''m running file_column 0.3.1, and having a few problems... which are: - Uploading a 378x567 jpg, and using :magick => {:geometry => "100x100" }, my image ends up being 67x100 ? Is there a way to "force" the image to be the size you specify ? - My view has a drop-down of sizes, and I''m trying to pass in this size into :magick =>
2006 Apr 28
2
file_column with polymorphic table relationship?
Hello, I''m just starting out with both Rails and Ruby, so I hope this isn''t too simple of a question - but I''ve been struggling to find a solution. I''m using the file_column plugin to handle image uploads and thumbnail generation. In addition, I''ve wrapped the image into a polymorphic table so I can have uploaded images associated with multiple
2006 Feb 13
3
file_column: uninitialized constant Magick
I am getting this following error when using file_column with RMagick: uninitialized constant Magick /usr/local/lib/ruby/gems/1.8/gems/activesupport-1.2.5/lib/ active_support/dependencies.rb:200:in `const_missing'' ./script/../config/../vendor/plugins/rails_file_column/plugins/ file_column/branches/kyle/lib/file_column.rb:621:in `file_column''
2006 Mar 08
3
file_column Cropping -> image offset information
Hello, I had a problem cropping images with file_column. These are my settings: file_column :image, :magick => { :versions => { :thumb => "80x80>", :medium => "150x150>", :square => { :crop => "1:1", :size => "50x50!" } },
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 Mar 16
0
problem with file_column storing images and other files
I have a model called ProductFiles which associates an arbitrary amount of image and documents with a product. I am using the file_column plugin to manage the upload and storage of the images, like so: class ProductFile < ActiveRecord::Base # Accepted MIME types, mime types that are not part of this list are rejected MIME_EXTENSIONS = { "image/gif" => "gif",
2006 Aug 11
0
File column and rmagick not creating resizing some images
I am new to RoR. I am trying to use file_column and rmagick to resize images uploaded to my RoR app. The problem is that only images larger than the dimensions specified in my code will resize. For instance, if the uploaded image is 98x98, then the new images will remain that size. How can I enlarge images using file_column and rmagick? Here is the code in my model: file_column
2005 Sep 09
5
file_column: patched for imagemagick and validation
Hi all, I patched file_column to add imagemagick transformations of uploaded content. I added an options hash, and it takes the :magick and :format keys. :magick is a string of imagemagick command line options for convert (Reference: http://www.imagemagick.org/script/convert.php). Format is an optional extension for the finished image. If Imagemagick recognizes the extension, then it will
2006 May 07
1
file_column problem - uninitialized constant Magick
Hi, I''m on Windows and getting the following error while trying to use file_column with RMagick, uninitialized constant Magick C:/INSTAN~1.0/ruby/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:123:in `const_missing'' #{RAILS_ROOT}/vendor/plugins/file_column/branches/kyle/lib/file_column.rb:621:in `file_column'' I installed file_column by
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 Jan 19
0
file_column error: tmp file created but not actual
Hi When I submit the form with field_column, the actual image is not uploaded, only temp files are crreated and I dont see actual file created and the image file name is not in the database and get "fieldWithErrors". Then if submit again, the actual file in created and an database record is generated. Here is the log file. I print @params and @wallpaper. I find the following: 1st
2006 Mar 02
0
path problem with file_column and :magick options
Hi there, I''m having some problems wityh the :magick options in file_coumn and wondered if anyone else had any similar ones: basically, file_column is working fine for me as is, but whenever I try to do an automatic resize or thumbnail I get the error ''invalid image''. It seems to be a path issue as I get: unable to open image
2006 Feb 03
3
File_column and rmagick options
Hi, Currently I''m using the file_column plugin to upload images and save multiple copies of each at 3 different resoltions: file_column :name, :magick => { :versions => { "thumb96" => "96x150>", "medium250" => "250x400>", "large480" => "480X640>" } } I am wondering if
2006 Jan 05
5
File_column crashing WEBrick when using :magick options
I''m trying to use file_column in an app I''m writing. Simple file uploads are working fine. However, when I try and use the :magick options to make resized versions, WEBrick dies. This is the Media model: class Media < ActiveRecord::Base file_column :media_item, :magick => { :versions => { :thumb => {:size =>
2006 Jun 04
4
"can''t convert Magick::GravityType into Integer"
Am having trouble with file_column -- on certain crop operations, it says: A TypeError occurred in [controller]#[action]: can''t convert Magick::GravityType into Integer [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in `crop'' Any advice? Here''s the backtrace: [RAILS_ROOT]/vendor/plugins/trunk/lib/magick_file_column.rb:90:in `crop''
2006 Jul 19
0
Magick::GravityType Error
Trying to get an app up and running using file_column on Dreamhost, I run into this error on submitting an image to upload: can''t convert Magick::GravityType into Integer #{RAILS_ROOT}/vendor/plugins/file_column/lib/magick_file_column.rb:90:in `crop'' ... I half thought I found the hosting provider specific error in googling and finding this thread:
2006 May 17
2
uninitialized constant Magick Please help!
Dear Rail experts, thank you for such a resourceful list. I am working on an application using Rails 1.1 [REVISION=4240] whereas my server has Rails 1.0 installed. I recently decided to give file_column a try and everything works fine except I am getting the following error: "uninitialized constant Magick" I have tried setting environment variables,
2006 Nov 21
1
file_column and resizing only when it's bigger issue
I have limited space in my web design to display the logo of the upcoming event. So I put in code like this. file_column :image, :magick => { :versions => { "250x165" => "250x165"}} I was under the assumption that the image under directory 250x165 will be of this size if the image is bigger than 150x165. But I found out that for an image of size 134x88 the image
2006 Jun 20
0
file_column Trying to Create Thumbnails of Non-Image Files??
Howdy. We use the handy file_column plug-in in some of our apps. We have a model with a file field and we upload both images and non-images into this field. It is specified as follows: file_column :file_uri, :magick => {:versions => {:thumbnail => {:size => ''200x''}}} Well, it works great for images but for non-images, the save fails. The root cause is an