trabajo-afectivo/lib/session_helper/collection_dashboard.rb

21 lines
443 B
Ruby
Raw Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
2015-09-06 23:02:15 +00:00
module SessionHelper::CollectionDashboard
module_function
2015-09-06 23:02:15 +00:00
def session( collections, assets, user )
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