app/forms/decidim/admin/block_user_form.rb in decidim-admin-0.27.1 vs app/forms/decidim/admin/block_user_form.rb in decidim-admin-0.27.2
- old
+ new
@@ -1,10 +1,10 @@
# frozen_string_literal: true
module Decidim
module Admin
- # A form object used to officialize users from the admin dashboard.
+ # A form object used to block users or user groups on the admin dashboard.
class BlockUserForm < Form
attribute :user_id, Integer
attribute :justification, String
validates :user, presence: true
@@ -13,10 +13,10 @@
def map_model(user)
self.user_id = user.id
end
def user
- @user ||= Decidim::User.find_by(
+ @user ||= Decidim::UserBaseEntity.find_by(
id: user_id,
organization: current_organization
)
end
end