Skip to content

Commit

Permalink
One more tweak on unowned
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Oct 19, 2010
1 parent 4802484 commit 2c69f09
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/helpers/forums_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ def can_edit? forum
end

def fetch_metric_topics forum, user_or_enterprise
if user_or_enterprise && !user_or_enterprise.new_record?
if user_or_enterprise && user_or_enterprise.id != 0
# id of 0 is a special value indicating unowned
if user_or_enterprise.instance_of? Enterprise
# view for a particular enterprise
@owned_open_topics = Topic.owned.by_enterprise(user_or_enterprise.id).tracked.open.sort_by{|t| t.days_open * -1}
Expand Down Expand Up @@ -49,6 +50,7 @@ def dummy_all_forum

def dummy_unassigned_mediator
user = User.new(:last_name => "Un-owned")
user.id = 0
user
end

Expand Down

0 comments on commit 2c69f09

Please sign in to comment.