1
0
Fork 0
forked from OpenNeo/impress
impress/app/helpers/neopets_page_import_tasks_helper.rb
2015-07-27 13:25:24 -04:00

12 lines
No EOL
408 B
Ruby

module NeopetsPageImportTasksHelper
def neopets_page_list_options(user)
lists = user.closet_lists.group_by(&:hangers_owned?)
options = []
[true, false].each do |owned|
relevant_lists = lists[owned] || []
options << [closet_lists_group_name(:you, owned), owned]
options += relevant_lists.map { |list| ["&mdash;#{h list.name}".html_safe, list.id] }
end
options
end
end