minor cleanup to routes.rb
This commit is contained in:
parent
84412863dc
commit
ff58d63191
3 changed files with 14 additions and 14 deletions
|
|
@ -125,7 +125,7 @@ class PeopleController < ApplicationController
|
|||
end
|
||||
|
||||
def contacts
|
||||
@person = Person.find(params[:id])
|
||||
@person = Person.find(params[:person_id])
|
||||
if @person
|
||||
@contact = current_user.contact_for(@person)
|
||||
@aspect = :profile
|
||||
|
|
|
|||
|
|
@ -12,20 +12,17 @@ Diaspora::Application.routes.draw do
|
|||
end
|
||||
|
||||
resources :status_messages, :only => [:new, :create, :destroy, :show]
|
||||
get 'p/:id' => 'posts#show', :as => 'post'
|
||||
get 'bookmarklet' => 'status_messages#bookmarklet'
|
||||
get 'p/:id' => 'posts#show', :as => 'post'
|
||||
|
||||
resources :photos, :except => [:index] do
|
||||
put 'make_profile_photo' => :make_profile_photo
|
||||
end
|
||||
|
||||
resources :comments, :only => [:create, :destroy]
|
||||
|
||||
get 'tags/:name' => 'tags#show', :as => 'tag'
|
||||
resources :tags, :only => [:index]
|
||||
|
||||
resource :like, :only => [:create]
|
||||
|
||||
|
||||
resources :conversations do
|
||||
resources :messages, :only => [:create, :show]
|
||||
delete 'visibility' => 'conversation_visibilities#destroy'
|
||||
|
|
@ -35,6 +32,8 @@ Diaspora::Application.routes.draw do
|
|||
get 'read_all' => :read_all, :on => :collection
|
||||
end
|
||||
|
||||
resources :tags, :only => [:index]
|
||||
get 'tags/:name' => 'tags#show', :as => 'tag'
|
||||
|
||||
# Users and people
|
||||
|
||||
|
|
@ -42,7 +41,7 @@ Diaspora::Application.routes.draw do
|
|||
get :export
|
||||
get :export_photos
|
||||
end
|
||||
match '/people/:id/contacts' => 'people#contacts'
|
||||
|
||||
|
||||
controller :users do
|
||||
get 'public/:username' => :public, :as => 'users_public'
|
||||
|
|
@ -79,6 +78,7 @@ Diaspora::Application.routes.draw do
|
|||
resources :people, :except => [:edit, :update] do
|
||||
resources :status_messages
|
||||
resources :photos
|
||||
get :contacts
|
||||
post 'by_handle' => :retrieve_remote, :on => :collection, :as => 'person_by_handle'
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ describe PeopleController do
|
|||
it 'assigns the contacts of a person' do
|
||||
contact = alice.contact_for(bob.person)
|
||||
contacts = contact.contacts
|
||||
get :contacts, :id => bob.person.id
|
||||
get :contacts, :person_id => bob.person.id
|
||||
assigns(:contacts_of_contact).should == contacts
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue