trabajo-afectivo/lib/session_helper/collection_dashboard.rb

21 lines
441 B
Ruby
Raw Permalink 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
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