aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/comment.rb2
-rw-r--r--app/models/info_request.rb2
-rw-r--r--app/models/track_thing.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 75d37e04f..b4c099123 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -62,7 +62,7 @@ class Comment < ActiveRecord::Base
end
# When posting a new comment, use this to check user hasn't double submitted.
- def Comment.find_by_existing_comment(info_request_id, body)
+ def Comment.find_existing(info_request_id, body)
# XXX can add other databases here which have regexp_replace
if ActiveRecord::Base.connection.adapter_name == "PostgreSQL"
# Exclude spaces from the body comparison using regexp_replace
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index b990f4b41..c95b7427e 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -387,7 +387,7 @@ public
# repeated requests, say once a quarter for time information, then might need to do that.
# XXX this *should* also check outgoing message joined to is an initial
# request (rather than follow up)
- def InfoRequest.find_by_existing_request(title, public_body_id, body)
+ def InfoRequest.find_existing(title, public_body_id, body)
return InfoRequest.find(:first, :conditions => [ "title = ? and public_body_id = ? and outgoing_messages.body = ?", title, public_body_id, body ], :include => [ :outgoing_messages ] )
end
diff --git a/app/models/track_thing.rb b/app/models/track_thing.rb
index d5e1cdb75..d5dda7bb5 100644
--- a/app/models/track_thing.rb
+++ b/app/models/track_thing.rb
@@ -311,7 +311,7 @@ class TrackThing < ActiveRecord::Base
end
# When constructing a new track, use this to avoid duplicates / double posting
- def TrackThing.find_by_existing_track(tracking_user, track)
+ def TrackThing.find_existing(tracking_user, track)
if tracking_user.nil?
return nil
end