class Decidim::Meetings::AdminLog::InvitePresenter
InvitePresenter.new(action_log, view_helpers).present
view_helpers # => this comes from the views
action_log = Decidim::ActionLog.last
directly, but here’s an example:
Usage should be automatic and you shouldn’t need to call this class
for the ‘AdminLog` log.
This class holds the logic to present a `Decidim::Meetings::Invite`
def action_string
def action_string case action when "create", "delete", "update" "decidim.meetings.admin_log.invite.#{action}" else super end end
def i18n_params
Tries to use the attendee name from the invitation (resource).
def i18n_params attendee_name = action_log.resource ? action_log.resource.user.name : action_log.extra["attendee_name"] super.merge( # before Decidim v0.23.0 attendee_name was not being copied into the extras so it may be nil attendee_name: attendee_name || "????" ) end