Class: UsersController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/users_controller.rb

Overview

Users for visitors

Instance Method Summary collapse

Instance Method Details

#banObject

put /u/:slug/ban



34
35
36
37
38
# File 'app/controllers/users_controller.rb', line 34

def ban
  @socialization.ban(@entity)

  head :no_content
end

#followObject

put /u/:slug/follow



20
21
22
23
24
# File 'app/controllers/users_controller.rb', line 20

def follow
  @socialization.follow(@entity)

  head :no_content
end

#followeesObject

get /u/:slug/followees



14
15
16
17
# File 'app/controllers/users_controller.rb', line 14

def followees
  @filter     = params[:filter] || Hash.new
  @collection = UserLink.filtered(:followee, @filter).with_follower(@entity).page_for_user(current_page)
end

#showObject

get /u/:slug



10
11
# File 'app/controllers/users_controller.rb', line 10

def show
end

#unbanObject

delete /u/:slug/ban



41
42
43
44
45
# File 'app/controllers/users_controller.rb', line 41

def unban
  @socialization.unban(@entity)

  head :no_content
end

#unfollowObject

delete /u/:slug/follow



27
28
29
30
31
# File 'app/controllers/users_controller.rb', line 27

def unfollow
  @socialization.unfollow(@entity)

  head :no_content
end