Sha256: d5f46fe613a1a6b3b9326c1779d65e016b64e7bca2b74b27e1d16882d6f2a475
Contents?: true
Size: 634 Bytes
Versions: 3
Compression:
Stored size: 634 Bytes
Contents
module WorkflowKit class MarkAsDeceasedBrick < Brick def name "Mark User as Deceased" end def description "Move the user to the deceased status in all his corporations. Remove other group memberships. Set the date-of-death profile field. Deactivate user account." end def execute( params ) raise 'no user_id given' unless params[:user_id] raise 'no localized_date_of_death given' unless params[:localized_date_of_death] user = User.find(params[:user_id]) date_of_death = params[:localized_date_of_death].to_date user.mark_as_deceased at: date_of_death end end end
Version data entries
3 entries across 3 versions & 1 rubygems