Class: Decidim::RedesignedFollowersCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::RedesignedFollowersCell
show all
- Includes:
- ApplicationHelper, CardHelper, CellsPaginateHelper, LayoutHelper
- Defined in:
- decidim-core/app/cells/decidim/redesigned_followers_cell.rb
Instance Method Summary
collapse
Methods included from CardHelper
#card_for
Instance Method Details
#show ⇒ Object
11
12
13
14
15
|
# File 'decidim-core/app/cells/decidim/redesigned_followers_cell.rb', line 11
def show
return render :validations if validation_messages.present?
render :show
end
|
#users ⇒ Object
17
18
19
|
# File 'decidim-core/app/cells/decidim/redesigned_followers_cell.rb', line 17
def users
@users ||= model.followers.not_blocked.page(params[:page]).per(20)
end
|
#validation_messages ⇒ Object
21
22
23
|
# File 'decidim-core/app/cells/decidim/redesigned_followers_cell.rb', line 21
def validation_messages
[t("decidim.followers.no_followers")] if users.blank?
end
|