Class: Socializer::TiesController

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

Instance Method Summary collapse

Instance Method Details

#createObject



3
4
5
6
7
# File 'app/controllers/socializer/ties_controller.rb', line 3

def create
  @circle = Circle.find(params[:tie][:circle_id])
  @circle.add_contact(params[:tie][:contact_id])
  redirect_to @circle
end

#destroyObject



9
10
11
12
13
14
# File 'app/controllers/socializer/ties_controller.rb', line 9

def destroy
  @tie = Tie.find(params[:id])
  @circle = @tie.circle
  @tie.destroy
  redirect_to @circle
end