Sha256: 675c65db6da3d1132ecac5a3a0be5f86699ba940d59ba8f7b44e01746465848f

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

$LOAD_PATH << File.dirname(__FILE__)

# require 'netzke/core_ext'

require 'netzke/core'
require 'netzke/base'

module Netzke
  autoload :Core, 'netzke/core'
  autoload :ExtComponent, 'netzke/ext_component'

  class Engine < ::Rails::Engine
    config.after_initialize do
      # Do some initialization which is only possible after Rails is initialized
      Netzke::Core.ext_location ||= ::Rails.root.join("public", "extjs")
      Netzke::Core.with_icons = File.exists?("#{Rails.root}/public#{Netzke::Core.icons_uri}") if Netzke::Core.with_icons.nil?
    end
  end
end

# Rails specific
if defined? Rails
  require 'netzke/rails/routes'

  ActiveSupport.on_load(:action_controller) do
    require 'netzke/rails/controller_extensions'
    include Netzke::ControllerExtensions
  end

  ActiveSupport.on_load(:action_view) do
    require 'netzke/rails/action_view_ext'
    include Netzke::ActionViewExt
  end

  # Make this plugin auto-reloadable for easier development
  # ActiveSupport::Dependencies.autoload_once_paths.delete(File.join(File.dirname(__FILE__)))
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
netzke-core-0.6.3 lib/netzke-core.rb