Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added post attachment code.

  • Loading branch information...
commit 48ad1f52ee848086bb7ca6c677290ebeba535e6c 1 parent 1555e40
@surasys surasys authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  app/views/posts/show.haml
View
2  app/views/posts/show.haml
@@ -22,6 +22,8 @@
%br
%p
= @post.body
+ - @post.post_attachments.each do |attach|
+ = image_tag attach.attachment.url( :original ), { :border => 0, :width => 50, :height => 50 }
- if @post.event != nil
%br
%br

1 comment on commit 48ad1f5

@surasys
Collaborator

Make sure that your post attachment path is ":rails_root/public/system/assets/posts/attachments/:id/:style_:basename.:extension" in post_attachment.rb.

Please sign in to comment.
Something went wrong with that request. Please try again.