Sha256: f1f1869d89257eddb014d78507a55db362d70fef422d11e1f6ebe1910c5ff33e

Contents?: true

Size: 1.04 KB

Versions: 3

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

3 entries across 3 versions & 1 rubygems

Version Path
netzke-core-0.6.2 lib/netzke-core.rb
netzke-core-0.6.1 lib/netzke-core.rb
netzke-core-0.6.0 lib/netzke-core.rb