Skip to content

Commit

Permalink
Revert "use ActiveScaffold hook on initialization"
Browse files Browse the repository at this point in the history
This reverts commit f2464d2.
  • Loading branch information
scambra committed May 7, 2024
1 parent f2464d2 commit 5e94b8d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 26 deletions.
16 changes: 16 additions & 0 deletions lib/active_scaffold_sortable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,19 @@ def self.root
autoload 'ViewHelpers', 'active_scaffold_sortable/view_helpers.rb'
autoload 'AttributeParams', 'active_scaffold_sortable/attribute_params.rb'
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.stylesheets << 'active_scaffold_sortable'
ActiveScaffold.javascripts << 'active_scaffold_sortable'
13 changes: 0 additions & 13 deletions lib/active_scaffold_sortable/autoload.rb

This file was deleted.

13 changes: 0 additions & 13 deletions lib/active_scaffold_sortable/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,5 @@ class Engine < ::Rails::Engine
ActiveScaffold::Config::Core.send :prepend, ActiveScaffoldSortable::Core
ActiveScaffold::AttributeParams.send :prepend, ActiveScaffoldSortable::AttributeParams
end

initializer "active_scaffold_sortable.assets" do
ActiveSupport.on_load :active_scaffold do
self.stylesheets << 'active_scaffold_sortable'
self.javascripts << 'active_scaffold_sortable'
end
end

initializer "active_scaffold_sortable" do
ActiveSupport.on_load :active_scaffold do
require 'autoload'
end
end
end
end

0 comments on commit 5e94b8d

Please sign in to comment.