Class: Decidim::AttachmentCreatedEvent

Inherits:
Events::SimpleEvent
  • Object
show all
Defined in:
app/events/decidim/attachment_created_event.rb

Instance Method Summary collapse

Instance Method Details

#resource_pathObject



7
8
9
# File 'app/events/decidim/attachment_created_event.rb', line 7

def resource_path
  @resource.url
end

#resource_textObject



15
16
17
18
19
20
# File 'app/events/decidim/attachment_created_event.rb', line 15

def resource_text
  translated_attribute(
    resource.try(:description) ||
      resource.try(:body)
  )
end

#resource_urlObject



11
12
13
# File 'app/events/decidim/attachment_created_event.rb', line 11

def resource_url
  attached_to_url
end