Module: Redmine::Acts::Event::InstanceMethods
- Defined in:
- lib/plugins/acts_as_event/lib/acts_as_event.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
- #event_date ⇒ Object
- #event_group ⇒ Object
- #event_url(options = {}) ⇒ Object
-
#recipients ⇒ Object
Returns the mail addresses of users that should be notified.
Class Method Details
.included(base) ⇒ Object
44 45 46 |
# File 'lib/plugins/acts_as_event/lib/acts_as_event.rb', line 44 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#event_date ⇒ Object
64 65 66 |
# File 'lib/plugins/acts_as_event/lib/acts_as_event.rb', line 64 def event_date event_datetime.to_date end |
#event_group ⇒ Object
68 69 70 71 |
# File 'lib/plugins/acts_as_event/lib/acts_as_event.rb', line 68 def event_group group = [:group] ? send([:group]) : self group || self end |
#event_url(options = {}) ⇒ Object
73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/plugins/acts_as_event/lib/acts_as_event.rb', line 73 def event_url( = {}) option = [:url] if option.is_a?(Proc) option.call(self).merge() elsif option.is_a?(Hash) option.merge() elsif option.is_a?(Symbol) send(option).merge() else option end end |
#recipients ⇒ Object
Returns the mail addresses of users that should be notified
87 88 89 90 91 |
# File 'lib/plugins/acts_as_event/lib/acts_as_event.rb', line 87 def recipients notified = project.notified_users notified.reject! {|user| !visible?(user)} notified.collect(&:mail) end |