Sha256: 4c872f61a614ac43a338d8d126016c1a1034be0ff1249988e455d9f34853990f

Contents?: true

Size: 1.05 KB

Versions: 1

Compression:

Stored size: 1.05 KB

Contents

require "active_scaffold_sortable/config/core.rb"
require "active_scaffold_sortable/core.rb"
require "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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
active_scaffold_sortable-3.0.2 lib/active_scaffold_sortable.rb