[openstreetmap/openstreetmap-website] Convert database config to support reading from replicas (#2563)

mmd notifications at github.com
Sun Mar 29 09:39:27 UTC 2020


Here's one candidate: reading a message (via GET /message/id) updates the message_read flag:

```ruby
  # Show a message
  def show
    @title = t ".title"
    @message = Message.find(params[:id])

    if @message.recipient == current_user || @message.sender == current_user
      @message.message_read = true if @message.recipient == current_user
      @message.save            <<<<<<<
    else
```

![image](https://user-images.githubusercontent.com/5842757/77845732-6ff99880-71b1-11ea-9444-94fbf034c9b3.png)


-- 
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/2563#issuecomment-605609928
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20200329/edcaf158/attachment-0001.htm>


More information about the rails-dev mailing list