summaryrefslogtreecommitdiffstats
path: root/app/controllers/comments_controller.rb
diff options
context:
space:
mode:
authorMarius Mathiesen <marius.mathiesen@gmail.com>2009-03-30 13:19:04 +0200
committerJohan Sørensen <johan@johansorensen.com>2009-04-22 15:18:00 +0200
commit1b2111bc1f1469de6659bd3f740775cb17b03701 (patch)
tree04408cd2301099d2412bbdb5d202025380ffb375 /app/controllers/comments_controller.rb
parentea48836457242a053351e8fe00e87362b89cca5e (diff)
downloadgitorious-mainline-outdated-1b2111bc1f1469de6659bd3f740775cb17b03701.zip
gitorious-mainline-outdated-1b2111bc1f1469de6659bd3f740775cb17b03701.tar.gz
gitorious-mainline-outdated-1b2111bc1f1469de6659bd3f740775cb17b03701.tar.bz2
Rethinking the relationship between comments and its events:
- The event created for a comment now belongs to the repository - The comment's id is stored in the Event's data property, ensuring the relationship can be held Added a migration that migrates existing data into this new regime. Should also be reversable.
Diffstat (limited to 'app/controllers/comments_controller.rb')
-rw-r--r--app/controllers/comments_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index f0d0a66..98d1c8b 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -46,7 +46,8 @@ class CommentsController < ApplicationController
@comment.target = @repository
respond_to do |format|
if @comment.save
- @project.create_event(Action::COMMENT, @comment, current_user)
+# def create_event(action_id, target, user, data = nil, body = nil, date = Time.now.utc)"
+ @project.create_event(Action::COMMENT, @repository, current_user, @comment.to_param)
format.html do
flash[:success] = I18n.t "comments_controller.create_success"
if @comment.sha1.blank?