Remove overloaded filtering scope from my menu
Making the filtering object serve the role of loading 4 collections is not good separation.
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
class My::MenusController < ApplicationController
|
||||
include FilterScoped
|
||||
|
||||
def show
|
||||
fresh_when etag: [ @user_filtering, Current.session ]
|
||||
@filters = Current.user.filters.all
|
||||
@boards = Current.user.boards.ordered_by_recently_accessed
|
||||
@tags = Tag.all.alphabetically
|
||||
@users = User.active.alphabetically
|
||||
|
||||
# fresh_when etag: [ @user_filtering, Current.session ]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user