Flowdock
method

sorted_groups

Importance_0
v4.2.1 - Show latest stable - 0 notes - Class: Rails::Generators
sorted_groups() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails/generators.rb, line 236
    def self.sorted_groups
      namespaces = public_namespaces
      namespaces.sort!
      groups = Hash.new { |h,k| h[k] = [] }
      namespaces.each do |namespace|
        base = namespace.split(':').first
        groups[base] << namespace
      end
      rails = groups.delete("rails")
      rails.map! { |n| n.sub(/^rails:/, '') }
      rails.delete("app")
      rails.delete("plugin")

      hidden_namespaces.each { |n| groups.delete(n.to_s) }

      [["rails", rails]] + groups.sort.to_a
    end
Register or log in to add new notes.