lib/adminos.rb in adminos-1.0.0.pre.rc.2 vs lib/adminos.rb in adminos-1.0.0.pre.rc.3
- old
+ new
@@ -1,21 +1,42 @@
require 'path'
require 'rails'
require 'jquery-fileupload-rails'
require 'dotenv-rails'
require 'babosa'
-require 'russian'
require 'devise'
require 'cancancan'
+require 'ransack'
require 'cocoon'
+require 'simple_form'
module Adminos
+
+ autoload :FormBuilder, 'adminos/form_builder'
+
+ class << self
+ attr_writer :configuration
+ end
+
+ def self.configuration
+ @configuration ||= Configuration.new
+ end
+
+ def self.reset
+ @configuration = Configuration.new
+ end
+
+ def self.configure
+ yield(configuration)
+ end
+
Helpers = Module.new
NestedSet = Module.new
Controllers = Module.new
StatefulLink = Module.new
+
Path.require_tree 'adminos', except: %w[generators operations]
class Engine < ::Rails::Engine
initializer 'adminos.view_helpers' do
ActionView::Base.send :include, Helpers::View
@@ -24,10 +45,11 @@
end
initializer 'adminos.controller_helpers' do
ActionController::Base.send :include, Controllers::Helpers
ActionController::Base.send :include, Controllers::Resource
+ ActionController::Base.send :include, Controllers::Filters
end
initializer 'adminos.stateful_link' do
ActionView::Base.send :include, StatefulLink::Helper
ActionController::Base.send :include, StatefulLink::ActionAnyOf
@@ -36,7 +58,5 @@
initializer 'adminos.assets' do
Rails.application.config.assets.precompile += %w(apple-touch-icon.png favicon-32x32.png favicon-16x16.png safari-pinned-tab.svg favicon.ico)
end
end
end
-
-require 'adminos/extensions/nested_set'