Ruby on Rails Tuesday, April 7, 2015

On 7 April 2015 at 09:52, Edward Maya <lists@ruby-forum.com> wrote:
> 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>

You have not explained what is not happening that should happen. Do
you mean that the thumb does not display? Is the html correct (view
the html in the browser).

Colin

--
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/CAL%3D0gLtRfcDCxcHjjsQkww3fU82DNi847XU6u22hfcBrwmiDtg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment