mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 12:42:57 +08:00
c996b7fe4b
Prior to this fix `context.membership&.update!(last_viewed_at: Time.zone.now)` would generate an update statement from a GET request which is not permitted by default when in readonly mode. The usual fix in this case is to check for readonly or rescue an error, however, this common pattern of updating "last seen" or similar can be better handled in a `Schedule::Defer` block, which won't raise the `ActiveRecord::ReadOnlyError` when in readonly and will also prevent the controller to wait for this operation. |
||
---|---|---|
.. | ||
components/chat | ||
fabricators | ||
integration | ||
jobs | ||
lib | ||
mailers | ||
models | ||
queries/chat | ||
requests | ||
serializer | ||
services | ||
support | ||
system | ||
validators | ||
plugin_helper.rb | ||
plugin_spec.rb |