lib/ecrire/theme/engine.rb in ecrire-0.31.1 vs lib/ecrire/theme/engine.rb in ecrire-0.31.2
- old
+ new
@@ -42,11 +42,11 @@
# This could be modified in the user's theme.
#
#
def paths
@paths ||= begin
- paths = Rails::Paths::Root.new(root_path)
+ paths = Rails::Paths::Root.new(Ecrire::Theme.path)
paths.add 'app/views', with: 'views'
paths.add 'app/controllers', with: 'controllers', eager_load: true
paths.add 'app/assets', with: 'assets', glob: '*'
paths.add 'app/helpers', with: 'helpers', eager_load: true
@@ -118,12 +118,12 @@
app.paths.add 'public', with: self.paths['public'].existent
end
end
initializer 'ecrire.append_paths', before: :set_autoload_paths do |app|
- app.config.eager_load_paths.unshift *paths.eager_load
- app.config.autoload_once_paths.unshift *paths.autoload_once
- app.config.autoload_paths.unshift *paths.autoload_paths
+ app.config.eager_load_paths.unshift(*paths.eager_load)
+ app.config.autoload_once_paths.unshift(*paths.autoload_once)
+ app.config.autoload_paths.unshift(*paths.autoload_paths)
end
end
end