[openstreetmap/openstreetmap-website] Pass the user object, rather than the id, for sessions (#1456)

Andy Allan notifications at github.com
Wed Feb 22 10:42:16 UTC 2017

@zverik the method accepts either an id, or an object, for creating the session. It's shorter and easier to read when we pass the object.

It's a common convention in Rails to be flexible like this. For example, both of the following work:

u = User.first
DiaryEntry.where(:user => u)
DiaryEntry.where(:user => u.id)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20170222/231230e7/attachment-0001.html>

More information about the rails-dev mailing list