mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Merge pull request #3130 from AndrewKvalheim/vote-cache-expiration
Expire voting fragment caches
This commit is contained in:
commit
86b8990d71
5 changed files with 72 additions and 3 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
class Vote < ApplicationRecord
|
||||
belongs_to :user
|
||||
belongs_to :event
|
||||
belongs_to :event, touch: true
|
||||
|
||||
validates :user_id, uniqueness: { scope: :event_id }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- cache ['admin', conference_id, program, event] do
|
||||
- cache ['admin', conference_id, program, event, current_user] do
|
||||
%tr{ id: "event-#{event.id}" }
|
||||
%td
|
||||
= event.id
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
- cache ['admin/event', @conference, @program, @event] do
|
||||
- cache ['admin/event', @conference, @program, @event, current_user] do
|
||||
.row
|
||||
.col-md-12
|
||||
%h3
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue