lib/trestle.rb in trestle-0.9.2 vs lib/trestle.rb in trestle-0.9.3
- old
+ new
@@ -1,48 +1,32 @@
-require "trestle/version"
+require_relative "trestle/version"
require "active_support/all"
require "kaminari"
module Trestle
- extend ActiveSupport::Autoload
+ require_relative "trestle/evaluation_context"
+ require_relative "trestle/builder"
+ require_relative "trestle/hook"
+ require_relative "trestle/toolbar"
+ require_relative "trestle/adapters"
+ require_relative "trestle/attribute"
+ require_relative "trestle/breadcrumb"
+ require_relative "trestle/configurable"
+ require_relative "trestle/configuration"
+ require_relative "trestle/display"
+ require_relative "trestle/form"
+ require_relative "trestle/model_name"
+ require_relative "trestle/navigation"
+ require_relative "trestle/options"
+ require_relative "trestle/reloader"
+ require_relative "trestle/scopes"
+ require_relative "trestle/tab"
+ require_relative "trestle/table"
+ require_relative "trestle/admin"
+ require_relative "trestle/resource"
- autoload :Adapters
- autoload :Admin
- autoload :ApplicationController
- autoload :Attribute
- autoload :Breadcrumb
- autoload :Builder
- autoload :Configurable
- autoload :Configuration
- autoload :Display
- autoload :EvaluationContext
- autoload :Form
- autoload :Hook
- autoload :ModelName
- autoload :Navigation
- autoload :Options
- autoload :Reloader
- autoload :Resource
- autoload :Scopes
- autoload :Tab
- autoload :Table
- autoload :Toolbar
-
- module Controller
- extend ActiveSupport::Autoload
-
- autoload :Breadcrumbs
- autoload :Callbacks
- autoload :Dialog
- autoload :Helpers
- autoload :Layout
- autoload :Location
- autoload :Title
- autoload :Toolbars
- end
-
mattr_accessor :admins
self.admins = {}
def self.admin(name, options={}, &block)
register(Admin::Builder.create(name, options, &block))
@@ -84,6 +68,6 @@
[locale]
end
end
end
-require "trestle/engine" if defined?(Rails)
+require_relative "trestle/engine" if defined?(Rails)