Class: Decidim::ProfilesController

Inherits:
ApplicationController show all
Includes:
Flaggable, UserGroups
Defined in:
decidim-core/app/controllers/decidim/profiles_controller.rb

Overview

The controller to handle the user’s public profile page.

Constant Summary

Constants included from RedesignLayout

RedesignLayout::FALLBACK_LAYOUT

Instance Method Summary collapse

Methods included from UserGroups

#enforce_user_groups_enabled

Methods included from UserBlockedChecker

#check_user_block_status, #check_user_not_blocked

Methods included from NeedsSnippets

#snippets

Methods included from HttpCachingDisabler

#disable_http_caching

Methods included from HasStoredPath

#skip_store_location?, #store_current_location

Methods included from NeedsOrganization

enhance_controller, extended, included

Instance Method Details

#activityObject



60
61
62
63
64
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 60

def activity
  @content_cell = "decidim/user_activity"
  @title_key = "activity"
  render :show
end

#badgesObject



38
39
40
41
42
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 38

def badges
  @content_cell = "decidim/badges"
  @title_key = "badges"
  render :show
end

#followersObject



32
33
34
35
36
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 32

def followers
  @content_cell = "decidim/followers"
  @title_key = "followers"
  render :show
end

#followingObject



26
27
28
29
30
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 26

def following
  @content_cell = "decidim/following"
  @title_key = "following"
  render :show
end

#groupsObject



44
45
46
47
48
49
50
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 44

def groups
  enforce_user_groups_enabled

  @content_cell = "decidim/groups"
  @title_key = "groups"
  render :show
end

#membersObject



52
53
54
55
56
57
58
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 52

def members
  enforce_user_groups_enabled

  @content_cell = "decidim/members"
  @title_key = "members"
  render :show
end

#showObject



20
21
22
23
24
# File 'decidim-core/app/controllers/decidim/profiles_controller.rb', line 20

def show
  return redirect_to profile_members_path if profile_holder.is_a?(Decidim::UserGroup)

  redirect_to profile_activity_path(nickname: params[:nickname])
end