f01a648441
Add account data to fresh_when etag arrays so Rails serves fresh responses after account changes. - Add @accounts to menus controller etag - Add Current.account to boards controller etag - Add ETag cache invalidation tests for both controllers
12 lines
395 B
Ruby
12 lines
395 B
Ruby
class My::MenusController < ApplicationController
|
|
def show
|
|
@filters = Current.user.filters.all
|
|
@boards = Current.user.boards.ordered_by_recently_accessed
|
|
@tags = Current.account.tags.all.alphabetically
|
|
@users = Current.account.users.active.alphabetically
|
|
@accounts = Current.identity.accounts
|
|
|
|
fresh_when etag: [ @filters, @boards, @tags, @users, @accounts ]
|
|
end
|
|
end
|