meskyanichi/mongoid-paperclip — Issue #16: Odd method error
Author: noonandr
Created: 2011-10-20 11:03:19+00:00
State: open

I'm getting an odd error when trying to create multiple sized images during upload

```
undefined method `first' for #
```

The code is basically the advanced option in the readme:

```Ruby
class Item
include Mongoid::Document
field :name
embeds_many :images

end
```

```Ruby
class Image
include Mongoid::Document
include Mongoid::Paperclip

embedded_in :item, :inverse_of => :images

has_mongoid_attached_file :art,
:path => ':id/:style.:extension',
:storage => :s3,
:url => 'https://s3.amazonaws.com/',
:bucket => 'buket',
:s3_credentials => "#{RAILS_ROOT}/config/s3.yml",
:styles => {
:original => ['1920x1680>', :jpg],
:small => ['100x100#', :jpg],
:medium => ['250x250', :jpg],
:large => ['500x500>', :jpg]
}
end
```
Any ideas what I may be doing wrong? Thanks.