Sha256: 13b76d78f16e6dd65f615f02c261ea7476a81cf8ab7fdd471e8fcc856bedc0e8

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

require "#{File.dirname(__FILE__)}/active_scaffold_sortable/config/core.rb"
require "#{File.dirname(__FILE__)}/active_scaffold_sortable/core.rb"
require "#{File.dirname(__FILE__)}/active_scaffold_sortable/view_helpers.rb"


module ActiveScaffoldSortable
  def self.root
    File.dirname(__FILE__) + "/.."
  end
end

module ActiveScaffold
  module Actions
    ActiveScaffold.autoload_subdir('actions', self, File.dirname(__FILE__))
  end

  module Config
    ActiveScaffold.autoload_subdir('config', self, File.dirname(__FILE__))
  end

  module Helpers
    ActiveScaffold.autoload_subdir('helpers', self, File.dirname(__FILE__))
  end
end

ActiveScaffold::Config::Core.send :include, ActiveScaffoldSortable::Core
ActionView::Base.send(:include, ActiveScaffoldSortable::ViewHelpers)

##
## Run the install assets script, too, just to make sure
## But at least rescue the action in production
##
Rails::Application.initializer("active_scaffold_sortable.install_assets", :after => "active_scaffold.install_assets") do
  begin
    ActiveScaffoldAssets.copy_to_public(ActiveScaffoldSortable.root)
  rescue
    raise $! unless Rails.env == 'production'
  end
end unless defined?(ACTIVE_SCAFFOLD_SORTABLE_INSTALLED) && ACTIVE_SCAFFOLD_SORTABLE_INSTALLED == :plugin

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_scaffold_sortable_vho-3.0.0 lib/active_scaffold_sortable.rb