diff --git a/app/controllers/aspect_memberships_controller.rb b/app/controllers/aspect_memberships_controller.rb index c7be3a84f75b8d5a0dcb2b937a46d413a38e30c2..9d5c26a1c33f0ffeeb57ed94589c467a5181eb76 100644 --- a/app/controllers/aspect_memberships_controller.rb +++ b/app/controllers/aspect_memberships_controller.rb @@ -3,20 +3,10 @@ # the COPYRIGHT file. # -class AspectMembershipsController < ApplicationController +class AspectMembershipsController < ApplicationController before_filter :authenticate_user! - def new - render :nothing => true - end - - def index - raise - end - - - - def destroy + def destroy #note :id is garbage @person_id = params[:person_id] @@ -58,7 +48,6 @@ class AspectMembershipsController < ApplicationController @aspect = current_user.aspects.where(:id => params[:aspect_id]).first @contact = current_user.contact_for(@person) - current_user.add_contact_to_aspect(@contact, @aspect) flash.now[:notice] = I18n.t 'aspects.add_to_aspect.success' diff --git a/config/routes.rb b/config/routes.rb index 88e17c18ec3e1bf115c259d9992616110d74dc64..508e9a5a6239e46af77cacd17cf59bd6504d519f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -24,7 +24,7 @@ Diaspora::Application.routes.draw do resources :posts, :only => [:show], :path => '/p/' resources :contacts - resources :aspect_memberships + resources :aspect_memberships, :only => [:destroy, :create] resources :people, :except => [:edit, :update] do resources :status_messages @@ -41,7 +41,7 @@ Diaspora::Application.routes.draw do devise_for :users, :controllers => {:registrations => "registrations", :password => "devise/passwords", :invitations => "invitations"} do - + get 'invitations/resend/:id' => 'invitations#resend', :as => 'invitation_resend' end