Sha256: 0b09811f8538978868d361a9a4ebac61c7b789bb6a837045bb0950523a5b06e2

Contents?: true

Size: 542 Bytes

Versions: 10

Compression:

Stored size: 542 Bytes

Contents

class Admin::Kitsune::KitsuneController < Admin::Kitsune::ApplicationController
  before_filter :load_models
  
  private
  def load_models
    models = Kitsune.models_with_admin.map{ |m| Kitsune::Inspector.new(m) }
    category_map = {}
    
    @models =[]
    models.each do |m|
      if m.category
        category_map[m.category] = [] unless category_map[m.category]
        category_map[m.category] << m
      else
        @models << m
      end
    end
    @models += category_map.to_a.map{|c| Hash[*c]}
    #@models = models
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
kitsune-0.0.16 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.14 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.13 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.12 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.11 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.10 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.9 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.8 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.7 app/controllers/admin/kitsune/kitsune_controller.rb
kitsune-0.0.6 app/controllers/admin/kitsune/kitsune_controller.rb