Sha256: 74dc34900bf0d858cff288830dcac9d56c46848e2ddf3967ac20fbf833b17020

Contents?: true

Size: 500 Bytes

Versions: 1

Compression:

Stored size: 500 Bytes

Contents

require 'nitro/controller'

class AdminController < Nitro::Controller

  @template_root = File.join(File.dirname(__FILE__), 'template')
  
  def index
    @classes = self.class.managed_classes
  end

  class << self
    # The managed classes of this application.
    
    attr_accessor :managed_classes
  
    # Called when this controller is mounted.
       
    def mounted
      @managed_classes = Og.manager.manageable_classes
      @managed_classes.each { |c| scaffold(c) }
    end
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nitro-0.23.0 lib/part/admin/controller.rb