aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/comment_controller.rb
diff options
context:
space:
mode:
authorLouise Crow <louise.crow@gmail.com>2013-10-24 16:19:22 +0100
committerLouise Crow <louise.crow@gmail.com>2013-12-04 09:32:42 +0000
commit4b2e3ef0b6f5b881597242a4afe1404415256f3b (patch)
treeb2317647312a8960a988e61cc8e1b704d3a92bc2 /app/controllers/comment_controller.rb
parentcf11b959899d54cf3c7f4e018f11c2c89c83d4af (diff)
Make method names for finding existing objects clearer
They're not finding by the existing object, they're finding an existing object.
Diffstat (limited to 'app/controllers/comment_controller.rb')
-rw-r--r--app/controllers/comment_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/comment_controller.rb b/app/controllers/comment_controller.rb
index d4b17e9d2..cda56a211 100644
--- a/app/controllers/comment_controller.rb
+++ b/app/controllers/comment_controller.rb
@@ -38,7 +38,7 @@ class CommentController < ApplicationController
if params[:comment]
# XXX this check should theoretically be a validation rule in the model
- @existing_comment = Comment.find_by_existing_comment(@info_request.id, params[:comment][:body])
+ @existing_comment = Comment.find_existing(@info_request.id, params[:comment][:body])
else
# Default to subscribing to request when first viewing form
params[:subscribe_to_request] = true
@@ -68,7 +68,7 @@ class CommentController < ApplicationController
if params[:subscribe_to_request]
@track_thing = TrackThing.create_track_for_request(@info_request)
- @existing_track = TrackThing.find_by_existing_track(@user, @track_thing)
+ @existing_track = TrackThing.find_existing(@user, @track_thing)
if @user && @info_request.user == @user
# don't subscribe to own request!
elsif !@existing_track