Forum: Ruby on Rails Re: attachment_fu problem when using edge rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Mark S. (Guest)
on 2007-05-04 00:27
(Received via mailing list)
Just a guess but do you need

:size => 1.byte..2.megabytes

or

:size => 1.megabyte..2.megabytes


----- Original Message ----
From: adam <removed_email_address@domain.invalid>
To: removed_email_address@domain.invalid
Sent: Thursday, May 3, 2007 3:56:24 PM
Subject: [Rails] attachment_fu problem when using edge rails


Hi,

Has anyone any suggestions on whats going on here.

when ever I attempt to upload an image the following error message is
returned
"Size is not included in the list"

I have tried different settings in my model, but am not sure whats going
wrong.

here is my photo model

class Photo < ActiveRecord::Base

    #plugins
    has_attachment  :content_type => :image,
                    :storage => :file_system,
                    :size => 1..2.megabyte,
                    :resize_to => '250x350>',
                    :thumbnails => { :thumb => '40x40!' }

    validates_as_attachment

end

--
Posted via http://www.ruby-forum.com/.
adam (Guest)
on 2007-05-04 01:35
nope, that doesnt seem to make any difference. along with min_size and
max_size producing the same results.

Mark S. wrote:
> Just a guess but do you need
>
> :size => 1.byte..2.megabytes
>
> or
>
> :size => 1.megabyte..2.megabytes
>
This topic is locked and can not be replied to.