Sha256: ea16ca35e1ec3e73bb7acce1995bff68b71a74ba2b16f38efd8109ec7c2f9f9a

Contents?: true

Size: 605 Bytes

Versions: 45

Compression:

Stored size: 605 Bytes

Contents

# frozen-string_literal: true

module Decidim
  module Proposals
    class CollaborativeDraftWithdrawnEvent < Decidim::Events::SimpleEvent
      i18n_attributes :author_nickname, :author_name, :author_path

      delegate :nickname, :name, to: :author, prefix: true

      def nickname
        author_nickname
      end

      def author_path
        author.profile_path
      end

      private

      def author
        @author ||= Decidim::UserPresenter.new(author_user)
      end

      def author_user
        @author_user ||= Decidim::User.find_by(id: extra[:author_id])
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
decidim-proposals-0.23.3 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.23.2 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.23.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.23.1.rc1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.23.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.22.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.21.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.20.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.20.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.19.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.18.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.19.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.17.2 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.18.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.17.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.16.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.17.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.16.0 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.15.2 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb
decidim-proposals-0.15.1 app/events/decidim/proposals/collaborative_draft_withdrawn_event.rb