Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `first' for #<ActionDispatch::Http::UploadedFile:0x00000109915b68> #34

Open
sairamc opened this issue Oct 29, 2012 · 0 comments

Comments

@sairamc
Copy link

sairamc commented Oct 29, 2012

class Item
include Mongoid::Document
field :name, type: String
field :description, type: String

embeds_many :photos, cascade_callbacks: true
accepts_nested_attributes_for :photos
end

class Photo
include Mongoid::Document
include Mongoid::Paperclip

embedded_in :items, :inverse_of => :photos

has_mongoid_attached_file :attachment,
:storage => :s3,
:bucket => APP_CONFIG[:amazon_s3_photos_bucket],
:styles => {
:original => ['1920x1680>', :jpg],
:small => ['100x100#', :jpg],
:medium => ['250x250', :jpg],
:large => ['500x500>', :jpg]
},
:convert_options => { :all => '-background white -flatten +matte' }
end

I'm seeing undefined method `first' for #ActionDispatch::Http::UploadedFile:0x00000109915b68 error when I try to save the Item..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant