Class: Redmineup::JournalEvent

Inherits:
Journal
  • Object
show all
Defined in:
lib/redmineup/acts_as_journalized/journal_event.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.visible(user = User.current, options = {}) ⇒ Object



3
4
5
# File 'lib/redmineup/acts_as_journalized/journal_event.rb', line 3

def self.visible(user = User.current, options = {})
  visible_for(user, options)
end

Instance Method Details

#event_group ⇒ Object



20
21
22
# File 'lib/redmineup/acts_as_journalized/journal_event.rb', line 20

def event_group
  journalized
end

#event_title ⇒ Object



7
8
9
10
# File 'lib/redmineup/acts_as_journalized/journal_event.rb', line 7

def event_title
  title = up_activity_options[:title]
  title ? title.call(self) : journalized.to_s
end

#event_type ⇒ Object



16
17
18
# File 'lib/redmineup/acts_as_journalized/journal_event.rb', line 16

def event_type
  up_activity_options[:css_type] || "#{journalized_type.underscore.dasherize}-edit"
end

#event_url(options = {}) ⇒ Object



12
13
14
# File 'lib/redmineup/acts_as_journalized/journal_event.rb', line 12

def event_url(options = {})
  up_activity_options[:url].call(self).merge(options)
end