aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/comment_controller.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/comment_controller.rb b/app/controllers/comment_controller.rb
index c2315b73e..18544a98f 100644
--- a/app/controllers/comment_controller.rb
+++ b/app/controllers/comment_controller.rb
@@ -7,10 +7,10 @@
class CommentController < ApplicationController
before_filter :check_read_only, :only => [ :new ]
before_filter :find_info_request, :only => [ :new ]
+ before_filter :create_track_thing, :only => [ :new ]
protect_from_forgery :only => [ :new ]
def new
- @track_thing = TrackThing.create_track_for_request(@info_request)
if params[:comment]
@comment = Comment.new(params[:comment].merge({
:comment_type => 'request',
@@ -100,4 +100,8 @@ class CommentController < ApplicationController
end
end
+ def create_track_thing
+ @track_thing = TrackThing.create_track_for_request(@info_request)
+ end
+
end