zeus.ugent.be/lib/helpers/projects.rb

11 lines
186 B
Ruby
Raw Permalink Normal View History

2016-10-03 21:56:08 +02:00
module ProjectsHelper
2019-12-10 21:34:33 +01:00
def all_project_items
@items.find_all('/projects/*')
end
2016-10-03 21:56:08 +02:00
def all_projects
2019-12-10 21:34:33 +01:00
all_project_items.sort_by{|project| -(project[:priority] || 0)}
2016-10-03 21:56:08 +02:00
end
end