Return to Snippet

Revision: 13897
at May 11, 2009 09:15 by sionnnn


Initial Code
@posts.sort_by(&:date).each do |post|
    puts post
end

@tasks = {}
TaskList.find(:all).group_by(&:type) do |type, subtasks|
    @tasks[type] = subtasks.group_by(&:name)
end

Initial URL

                                

Initial Description

                                

Initial Title
rails sort_by and group_by

Initial Tags

                                

Initial Language
Ruby