[refs #265] fixed double wiki feed

This commit is contained in:
Alexander Machehin 2012-03-12 00:28:14 +06:00
parent 35d1323549
commit c4fd73b52b
1 changed files with 5 additions and 3 deletions

View File

@ -251,12 +251,14 @@ class WikiController < ApplicationController
end
def committer
p = commit_message.merge({:name => current_user.uname, :email => current_user.email})
@committer ||= Gollum::Committer.new(@wiki, p)
unless @committer
p = commit_message.merge({:name => current_user.uname, :email => current_user.email})
@committer = Gollum::Committer.new(@wiki, p)
# @committer.after_commit do |committer, sha1|
# here goes callback for notification
# end
ActivityFeedObserver.instance.after_create(@committer).delay
ActivityFeedObserver.instance.after_create(@committer).delay
end
@committer
end