Class: ConversationVisibilitiesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/conversation_visibilities_controller.rb

Overview

Copyright © 2010-2011, Diaspora Inc. This file is

licensed under the Affero General Public License version 3 or later.  See
the COPYRIGHT file.

Instance Method Summary collapse

Instance Method Details

#destroyObject


9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/conversation_visibilities_controller.rb', line 9

def destroy
  @vis = ConversationVisibility.where(:person_id => current_user.person.id,
                                      :conversation_id => params[:conversation_id]).first
  if @vis
    if @vis.destroy
      flash[:notice] = I18n.t('conversations.destroy.success')
    end
  end
  redirect_to conversations_path
end