Class: WikiContent
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- WikiContent
- Defined in:
- app/models/wiki_content.rb
Defined Under Namespace
Classes: Version
Instance Method Summary collapse
- #attachments ⇒ Object
- #project ⇒ Object
-
#recipients ⇒ Object
Returns the mail adresses of users that should be notified.
- #visible?(user = User.current) ⇒ Boolean
Instance Method Details
#attachments ⇒ Object
37 38 39 |
# File 'app/models/wiki_content.rb', line 37 def page.nil? ? [] : page. end |
#project ⇒ Object
33 34 35 |
# File 'app/models/wiki_content.rb', line 33 def project page.project end |
#recipients ⇒ Object
Returns the mail adresses of users that should be notified
42 43 44 45 46 |
# File 'app/models/wiki_content.rb', line 42 def recipients notified = project.notified_users notified.reject! {|user| !visible?(user)} notified.collect(&:mail) end |
#visible?(user = User.current) ⇒ Boolean
29 30 31 |
# File 'app/models/wiki_content.rb', line 29 def visible?(user=User.current) page.visible?(user) end |