fix removing from aspect -> contact removal bug
This commit is contained in:
parent
86fe2db24e
commit
95578e79c6
1 changed files with 5 additions and 5 deletions
|
|
@ -9,13 +9,13 @@ class AspectMembershipsController < ApplicationController
|
|||
def destroy
|
||||
#note :id is garbage
|
||||
|
||||
@person_id = params[:person_id]
|
||||
@aspect_id = params[:id]
|
||||
@person_id = params[:person_id]
|
||||
@aspect_id = params[:aspect_id]
|
||||
|
||||
@contact = current_user.contact_for(Person.where(:id => @person_id).first)
|
||||
membership = @contact ? @contact.aspect_memberships.where(:aspect_id => @aspect_id).first : nil
|
||||
@contact = current_user.contact_for(Person.where(:id => @person_id).first)
|
||||
membership = @contact ? @contact.aspect_memberships.where(:aspect_id => @aspect_id).first : nil
|
||||
|
||||
if membership && membership.destroy
|
||||
if membership && membership.destroy
|
||||
flash.now[:notice] = I18n.t 'aspect_memberships.destroy.success'
|
||||
|
||||
respond_to do |format|
|
||||
|
|
|
|||
Loading…
Reference in a new issue