DG IZ; a user can repost. aspects are not sent through the websocket. post does not show where it curently is going in its partial

This commit is contained in:
danielvincent 2010-09-22 12:03:25 -07:00
parent 8941975224
commit 5ef32b7d55
3 changed files with 18 additions and 1 deletions

View file

@ -37,4 +37,13 @@ class ApplicationController < ActionController::Base
@request_count = Request.for_user(current_user).size if current_user
end
def repost
@post = current_user.find_visible_post_by_id params[:id]
if current_user.repost( @post, :to => params[:aspect_ids] )
flash[:notice] = "Item re-shared."
else
flash[:error] = "Failed to re-share."
end
end
end

View file

@ -22,3 +22,9 @@
- if current_user.owns?(post)
.destroy_link
= link_to 'Delete', status_message_path(post), :confirm => 'Are you sure?', :method => :delete, :remote => true, :class => "delete"
%b reshare:
-if @aspects
- for aspect in @aspects
= link_to aspect, repost_path( :id => post.id, :aspect_ids => aspect.id )

View file

@ -7,12 +7,14 @@
Diaspora::Application.routes.draw do
resources :people, :only => [:index, :show, :destroy]
resources :users, :except => [:create, :new, :show]
resources :status_messages, :only => [:create, :destroy, :show]
resources :status_messages
resources :comments, :except => [:index]
resources :requests, :except => [:edit, :update]
resources :photos, :except => [:index]
resources :albums
match 'repost', :to => 'application#repost', :as => 'repost'
match 'aspects/move_friends', :to => 'aspects#move_friends', :as => 'move_friends'
match 'aspects/move_friend', :to => 'aspects#move_friend', :as => 'move_friend'
match 'aspects/manage', :to => 'aspects#manage'