moved the silly destory link over a bit
This commit is contained in:
parent
46ab63de36
commit
45a9d9e342
7 changed files with 50 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
19
spec/lib/web_socket_spec.rb
Normal file
19
spec/lib/web_socket_spec.rb
Normal 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
|
||||
Loading…
Reference in a new issue