Class: ShareVisibilitiesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/share_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

#updateObject


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

def update
  #note :id references a postvisibility
  params[:shareable_id] ||= params[:post_id]
  params[:shareable_type] ||= 'Post'

  vis = current_user.toggle_hidden_shareable(accessible_post)
  render :nothing => true, :status => 200
end