Class: Decidim::Amendable::AmendmentBaseEvent
Instance Method Summary
collapse
#email_intro, #email_outro, #email_subject, #email_subject_i18n_options, #event_has_roles?, i18n_attributes, #i18n_options, #i18n_scope, #notification_title, #participatory_space_url, #resource_path, #resource_text, #resource_url
#decidim_html_escape, #decidim_sanitize, #decidim_sanitize_admin, #decidim_sanitize_editor, #decidim_sanitize_editor_admin, #decidim_sanitize_newsletter, #decidim_url_escape, included
#can_be_managed?, #main_component_path, #main_component_url, #manage_component_path
#content_in_same_language?, #initialize, #organization, #perform_translation?, #resource_locator, #resource_path, #resource_text, #resource_title, #resource_url, #safe_resource_text, #safe_resource_translated_text, #translation_missing?, type
#default_locale?
Instance Method Details
#amendable_title ⇒ Object
8
9
10
|
# File 'app/events/decidim/amendable/amendment_base_event.rb', line 8
def amendable_title
@amendable_title ||= translated_attribute(amendable_resource.title)
end
|
#amendable_type ⇒ Object
12
13
14
|
# File 'app/events/decidim/amendable/amendment_base_event.rb', line 12
def amendable_type
@amendable_type ||= amendable_resource.class.model_name.human.downcase
end
|
#emendation_author ⇒ Object
20
21
22
23
24
25
26
27
28
|
# File 'app/events/decidim/amendable/amendment_base_event.rb', line 20
def emendation_author
return unless emendation_resource
@emendation_author ||= if emendation_resource.is_a?(Decidim::Coauthorable)
Decidim::UserPresenter.new(emendation_resource.creator_author)
else
Decidim::UserPresenter.new(emendation_resource.author)
end
end
|
#emendation_author_nickname ⇒ Object
30
31
32
33
34
|
# File 'app/events/decidim/amendable/amendment_base_event.rb', line 30
def emendation_author_nickname
return unless emendation_resource
@emendation_author_nickname ||= emendation_author.nickname
end
|
#emendation_author_path ⇒ Object
36
37
38
39
40
|
# File 'app/events/decidim/amendable/amendment_base_event.rb', line 36
def emendation_author_path
return unless emendation_resource
@emendation_author_path ||= emendation_author.profile_path
end
|
#emendation_path ⇒ Object
42
43
44
45
46
|
# File 'app/events/decidim/amendable/amendment_base_event.rb', line 42
def emendation_path
return unless emendation_resource
@emendation_path ||= Decidim::ResourceLocatorPresenter.new(emendation_resource).path
end
|