Class: UsersController

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

Overview

Users for visitors

Instance Method Summary collapse

Instance Method Details

#banObject

put /u/:slug/ban



36
37
38
39
40
# File 'app/controllers/users_controller.rb', line 36

def ban
  @socialization.ban(@entity)

  head :no_content
end

#followObject

put /u/:slug/follow



22
23
24
25
26
# File 'app/controllers/users_controller.rb', line 22

def follow
  @socialization.follow(@entity)

  head :no_content
end

#followeesObject

get /u/:slug/followees



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

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



12
13
# File 'app/controllers/users_controller.rb', line 12

def show
end

#unbanObject

delete /u/:slug/ban



43
44
45
46
47
# File 'app/controllers/users_controller.rb', line 43

def unban
  @socialization.unban(@entity)

  head :no_content
end

#unfollowObject

delete /u/:slug/follow



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

def unfollow
  @socialization.unfollow(@entity)

  head :no_content
end