Class: Socializer::CirclesController

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

Instance Method Summary collapse

Instance Method Details

#contact_ofObject



13
14
15
# File 'app/controllers/socializer/circles_controller.rb', line 13

def contact_of
  @circles = current_user.circles
end

#contactsObject



9
10
11
# File 'app/controllers/socializer/circles_controller.rb', line 9

def contacts
  @circles = current_user.circles
end

#createObject



29
30
31
32
33
# File 'app/controllers/socializer/circles_controller.rb', line 29

def create
  @circle = current_user.circles.build(params[:circle])
  @circle.save!
  redirect_to circles_contacts_path
end

#destroyObject



43
44
45
46
# File 'app/controllers/socializer/circles_controller.rb', line 43

def destroy
  @circle.destroy
  redirect_to circles_contacts_path
end

#editObject



35
36
# File 'app/controllers/socializer/circles_controller.rb', line 35

def edit
end

#find_peopleObject



17
18
19
# File 'app/controllers/socializer/circles_controller.rb', line 17

def find_people
  @circles = current_user.circles
end

#indexObject



5
6
7
# File 'app/controllers/socializer/circles_controller.rb', line 5

def index
  @circles = current_user.circles
end

#newObject



25
26
27
# File 'app/controllers/socializer/circles_controller.rb', line 25

def new
  @circle = Circle.new
end

#showObject



21
22
23
# File 'app/controllers/socializer/circles_controller.rb', line 21

def show
  @users = Person.all
end

#updateObject



38
39
40
41
# File 'app/controllers/socializer/circles_controller.rb', line 38

def update
  @circle.update!(params[:circle])
  redirect_to @circle
end