Ruby on Rails Tuesday, April 7, 2015

This is what i've tried using paperclip

My Model.rb
validates_presence_of :book_name, :price, :description, :author

has_attached_file :avatar, :default_url =>
"/images/:style/missing.png"
validates_attachment_content_type :avatar, :content_type =>
["image/jpg", "image/jpeg", "image/png", "image/gif"]

i'm not using styles because it is giving error "Avatar
Paperclip::Errors::NotIdentifiedByImageMagickError"

In Index File
the tag i'm using.
<td><%= image_tag booki.avatar.url(:thumb)%></td>

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a091b80a067b195e20d33b78cbd9aa46%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment