Skip to content

Commit

Permalink
Refactor all_involved_only? method into DigestRule class
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Leishman committed Mar 22, 2017
1 parent 72d033c commit 458fac9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 4 additions & 0 deletions app/models/digest_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,10 @@ def digest_only?
notify == DIGEST_ONLY
end

def all_involved_only?
project_selector == ALL_INVOLVED
end

private

def event_for_journal_detail(journal, jdetail)
Expand Down
6 changes: 1 addition & 5 deletions lib/redmine_digest/digest.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Digest

attr_reader :digest_rule, :time_to

delegate :name, :user, :recurrent, :project_selector,
delegate :name, :user, :recurrent, :project_selector, :all_involved_only?,
to: :digest_rule, allow_nil: true

def initialize(digest_rule, time_to = nil, issue_limit = nil)
Expand Down Expand Up @@ -208,10 +208,6 @@ def get_journal_all_involved_scope

end

def all_involved_only?
project_selector == DigestRule::ALL_INVOLVED
end

def project_ids
@project_ids ||= digest_rule.affected_project_ids
end
Expand Down

0 comments on commit 458fac9

Please sign in to comment.