lib/radiant/extension_loader.rb in radiant-1.0.0.rc3 vs lib/radiant/extension_loader.rb in radiant-1.0.0.rc4
- old
+ new
@@ -46,20 +46,20 @@
#
# extension_loader.paths(:metal) #=> ['extension/app/metal', 'extension/app/metal']
# extension_loader.paths(:controller) #=> ['extension/app/controllers', 'extension/app/controllers']
# extension_loader.paths(:eager_load) #=> ['extension/app/controllers', 'extension/app/models', 'extension/app/helpers']
#
- # For compatibility with the old loader, there are also corresponding +type_paths+
+ # For compatibility with the old loader, there are corresponding +type_paths+ methods.
# There are also (deprecated) +add_type_paths+ methods.
#
def paths(type)
ExtensionPath.send("#{type}_paths".to_sym)
end
# Loads but does not activate all the extensions that have been enabled, in the configured order
# (which defaults to alphabetically). If an extension fails to load an error will be logged
- # but application startup will not halt. If an extension doesn't exist, a LoadError will be raised
+ # but application startup will continue. If an extension doesn't exist, a LoadError will be raised
# and startup will halt.
#
def load_extensions
configuration = initializer.configuration
@observer ||= DependenciesObserver.new(configuration).observe(::ActiveSupport::Dependencies)
@@ -112,9 +112,11 @@
#
def record_path(path, name=nil)
ExtensionPath.from_path(path, name)
end
+ # For compatibility with old calls probably still to be found in some extensions.
+ #
%w{controller model view metal plugin load locale}.each do |type|
define_method("#{type}_paths".to_sym) do
paths(type)
end
define_method("add_#{type}_paths".to_sym) do |additional_paths|