Sha256: 1f33dcb3e4c45dc1c4607a85b6134ae363b849cf23f8b485384f64f3aa6a3d54

Contents?: true

Size: 592 Bytes

Versions: 7

Compression:

Stored size: 592 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Elections
    module Votes
      class VoteAcceptedEvent < Decidim::Events::SimpleEvent
        # This event sends a notification with the vote hash and further instructions
        i18n_attributes :resource_name, :encrypted_vote_hash, :verify_url

        def resource_name
          @resource_name ||= translated_attribute(resource.title)
        end

        def encrypted_vote_hash
          extra[:vote]["encrypted_vote_hash"]
        end

        def verify_url
          extra[:verify_url]
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-elections-0.28.4 app/events/decidim/elections/votes/vote_accepted_event.rb
decidim-elections-0.28.3 app/events/decidim/elections/votes/vote_accepted_event.rb
decidim-elections-0.28.2 app/events/decidim/elections/votes/vote_accepted_event.rb
decidim-elections-0.28.1 app/events/decidim/elections/votes/vote_accepted_event.rb
decidim-elections-0.28.0 app/events/decidim/elections/votes/vote_accepted_event.rb
decidim-elections-0.28.0.rc5 app/events/decidim/elections/votes/vote_accepted_event.rb
decidim-elections-0.28.0.rc4 app/events/decidim/elections/votes/vote_accepted_event.rb