[openstreetmap/openstreetmap-website] Avoid using or comparing explicit model ids (#1658)

Holger Jeromin notifications at github.com
Sun Oct 22 21:13:30 UTC 2017


HolgerJeromin commented on this pull request.



> @@ -411,8 +411,8 @@ def make_friend
     if @new_friend
       if request.post?
         friend = Friend.new
-        friend.user_id = current_user.id
-        friend.friend_user_id = @new_friend.id
+        friend.befriender = current_user
+        friend.befriendee = @new_friend

Imo here the old names were easier to understand.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/1658#pullrequestreview-71045159
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20171022/516f437a/attachment.html>


More information about the rails-dev mailing list