Class: Decidim::ProfilesController
Overview
The controller to handle the user’s public profile page.
Instance Method Summary
collapse
Methods included from UserGroups
#enforce_user_groups_enabled
#snippets
#disable_http_caching
register_permissions
enhance_controller, extended, included
Instance Method Details
#activity ⇒ Object
57
58
59
60
61
|
# File 'app/controllers/decidim/profiles_controller.rb', line 57
def activity
@content_cell = "decidim/user_activity"
@title_key = "activity"
render :show
end
|
#badges ⇒ Object
35
36
37
38
39
|
# File 'app/controllers/decidim/profiles_controller.rb', line 35
def badges
@content_cell = "decidim/badges"
@title_key = "badges"
render :show
end
|
#followers ⇒ Object
29
30
31
32
33
|
# File 'app/controllers/decidim/profiles_controller.rb', line 29
def followers
@content_cell = "decidim/followers"
@title_key = "followers"
render :show
end
|
#following ⇒ Object
23
24
25
26
27
|
# File 'app/controllers/decidim/profiles_controller.rb', line 23
def following
@content_cell = "decidim/following"
@title_key = "following"
render :show
end
|
#groups ⇒ Object
41
42
43
44
45
46
47
|
# File 'app/controllers/decidim/profiles_controller.rb', line 41
def groups
enforce_user_groups_enabled
@content_cell = "decidim/groups"
@title_key = "groups"
render :show
end
|
#members ⇒ Object
49
50
51
52
53
54
55
|
# File 'app/controllers/decidim/profiles_controller.rb', line 49
def members
enforce_user_groups_enabled
@content_cell = "decidim/members"
@title_key = "members"
render :show
end
|
#show ⇒ Object
16
17
18
19
20
21
|
# File 'app/controllers/decidim/profiles_controller.rb', line 16
def show
return redirect_to profile_timeline_path(nickname: params[:nickname]) if profile_holder == current_user
return redirect_to profile_members_path if profile_holder.is_a?(Decidim::UserGroup)
redirect_to profile_activity_path(nickname: params[:nickname])
end
|