Method: Decidim::Admin::UnblockUser#call

Defined in:
decidim-admin/app/commands/decidim/admin/unblock_user.rb

#callObject

Executes the command. Broadcasts these events:

  • :ok when everything is valid, together with the resource.

  • :invalid if the resource is not reported

Returns nothing.



21
22
23
24
25
26
# File 'decidim-admin/app/commands/decidim/admin/unblock_user.rb', line 21

def call
  return broadcast(:invalid) unless @blocked_user.blocked?

  unblock!
  broadcast(:ok, @blocked_user)
end