moved the silly destory link over a bit

This commit is contained in:
maxwell 2010-06-28 22:15:52 -07:00
parent 46ab63de36
commit 45a9d9e342
7 changed files with 50 additions and 10 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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; }

View file

@ -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

View file

@ -0,0 +1,19 @@
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