Skip to content
Extraits de code Groupes Projets
Valider b221e197 rédigé par danielvincent's avatar danielvincent
Parcourir les fichiers

every post partial shows a user picture. a post's comments are displayed with...

every post partial shows a user picture.  a post's comments are displayed with a count in its show page
parent 31629f81
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,6 +7,7 @@ class PhotosController < ApplicationController
def create
@photo = Photo.new(params[:photo])
@photo.person = current_user
if @photo.save
flash[:notice] = "Successfully uploaded photo."
......
......@@ -44,8 +44,8 @@ class Post
end
#ENCRYPTION
before_validation :sign_if_mine
validates_true_for :creator_signature, :logic => lambda {self.verify_creator_signature}
#before_validation :sign_if_mine
#validates_true_for :creator_signature, :logic => lambda {self.verify_creator_signature}
xml_accessor :creator_signature
key :creator_signature, String
......
%li.message{:id => post.id, :class => ("mine" if mine?(post))}
= person_image_tag(post.person)
%span.from
= link_to_person post.person
%b wrote a new blog post
......
......@@ -10,6 +10,9 @@
%strong Owner:
= @blog.person.real_name
%h4= "comments (#{@blog.comments.count})"
= render "comments/comments", :post => @blog
%p
= link_to "Edit", edit_blog_path(@blog)
|
......
%li.message{:id => post.id, :class => ("mine" if mine?(post))}
= person_image_tag(post.person)
%span.from
= link_to_person post.person
%b shared a link
......
......@@ -10,6 +10,9 @@
%strong Owner:
= @bookmark.person.real_name
%h4= "comments (#{@bookmark.comments.count})"
= render "comments/comments", :post => @bookmark
%p
= link_to "Edit", edit_bookmark_path(@bookmark)
|
......
%li.message{:id => post.id}
= person_image_tag(post.person)
%span.from
= link_to_person post.person
%b posted a new photo
%br
= link_to (image_tag post.image.url(:small_thumb)), photo_path(post)
%div.time
= link_to(how_long_ago(post), status_message_path(post))
\--
= link_to "show comments (#{post.comments.count})", '#', :class => "show_post_comments"
= render "comments/comments", :post => post
- title "Photo"
%p
%strong Photo:
= image_tag @photo.image.url
= image_tag @photo.image.url
%h4= "comments (#{@photo.comments.count})"
= render "comments/comments", :post => @photo
%p
= link_to "Destroy", @photo, :confirm => 'Are you sure?', :method => :delete
......
......@@ -8,6 +8,9 @@
%strong Owner:
= @status_message.person.real_name
%h4= "comments (#{@status_message.comments.count})"
= render "comments/comments", :post => @status_message
%p
= link_to "Destroy", @status_message, :confirm => 'Are you sure?', :method => :delete
|
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter