trabajo-afectivo/lib/session_helper/collection_dashboard.rb

21 lines
442 B
Ruby
Raw Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
2015-09-06 23:02:15 +00:00
module SessionHelper::CollectionDashboard
module_function
def session(collections, assets, user)
2015-09-06 23:02:15 +00:00
return [collections, assets] if !user
item = StatsStore.find_by(
stats_storable: user,
key: 'dashboard',
2015-09-06 23:02:15 +00:00
)
return [collections, assets] if !item
2015-09-06 23:02:15 +00:00
collections['StatsStore'] = [item]
[collections, assets]
end
end