Class: Socializer::PeopleController

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

Instance Method Summary collapse

Instance Method Details

#editObject



12
13
14
# File 'app/controllers/socializer/people_controller.rb', line 12

def edit
  @person = current_user
end

#indexObject



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

def index
  @people = Person.all
end

#likesObject

TODO: Should be handled by the likes controller. Used to display the likes in the user profile



23
24
25
# File 'app/controllers/socializer/people_controller.rb', line 23

def likes
  @likes = @person.likes
end

#messageObject



27
28
29
# File 'app/controllers/socializer/people_controller.rb', line 27

def message
  @current_id = @person.guid
end

#showObject



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

def show
end

#updateObject



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

def update
  current_user.update!(params[:person])
  redirect_to current_user
end