Skip to content
Extraits de code Groupes Projets
Valider 45a9d9e3 rédigé par maxwell's avatar maxwell
Parcourir les fichiers

moved the silly destory link over a bit

parent 46ab63de
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -2,7 +2,7 @@ class FriendsController < ApplicationController
before_filter :authenticate_user!
def index
@friends = Friend.all
@friends = Friend.paginate :page => params[:page], :order => 'created_at DESC'
end
def show
......
......@@ -2,10 +2,11 @@
%span.from
= link_to_person post.person
%b wrote a new blog post
- if mine?(post)
.destroy_link
= link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
%br
%b= post.title
%br
= raw post.body
%div.time= link_to "#{time_ago_in_words(post.updated_at)} ago", blog_path(post)
- if mine?(post)
= link_to 'Destroy', blog_path(post), :confirm => 'Are you sure?', :method => :delete
......@@ -2,12 +2,13 @@
%span.from
= link_to_person post.person
%b shared a link
- if mine?(post)
.destroy_link
= link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
%br
= post.title
%a{:href => "#{post.link}"}
= post.link
%div.time= link_to "#{time_ago_in_words(post.updated_at)} ago", bookmark_path(post)
- if mine?(post)
= link_to 'Destroy', bookmark_path(post), :confirm => 'Are you sure?', :method => :delete
......@@ -2,11 +2,11 @@
%span.from
= link_to_person post.person
= post.message
- if mine?(post)
.destroy_link
= link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
%div.time
= link_to(how_long_ago(post), status_message_path(post))
= render "comments/comments", :post => post
- if mine?(post)
= link_to 'Destroy', status_message_path(post), :confirm => 'Are you sure?', :method => :delete
......@@ -203,3 +203,12 @@ ul.comment_set {
img#profile_picture {
width: 100%; }
.pagination a {
padding: 3px; }
.destroy_link {
float: right; }
#debug_info {
margin-top: 20px; }
......@@ -239,3 +239,13 @@ ul.comment_set
img#profile_picture
:width 100%
.pagination
a
:padding 3px
.destroy_link
:float right
#debug_info
:margin-top 20px
require File.dirname(__FILE__) + '/../spec_helper'
describe WebSocket do
it 'should prepare a view along with an objects class in json' do
EventMachine.run {
include WebSocket
user = Factory.create(:user)
post = Factory.create(:status_message)
json = WebSocket.view_hash(post)
json.should include post.message
EventMachine.stop
}
end
end
\ No newline at end of file
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