lib/cells/railtie.rb in cells-3.10.1 vs lib/cells/railtie.rb in cells-3.11.0
- old
+ new
@@ -5,26 +5,23 @@
config.cells = ActiveSupport::OrderedOptions.new
initializer "cells.attach_router" do |app|
Cell::Base.class_eval do
- include app.routes.url_helpers
+ include app.routes.url_helpers # TODO: i hate this, make it better in Rails.
end
end
- initializer "cells.setup_view_paths" do |app|
- Cell::Base.setup_view_paths!
- end
-
initializer "cells.setup_engines_view_paths" do |app|
Cells::Engines.append_engines_view_paths_for(app.config.action_controller)
end
# ruthlessly stolen from the zurb-foundation gem.
add_paths_block = lambda do |app|
(app.config.cells.with_assets or []).each do |name|
# FIXME: this doesn't take engine cells into account.
app.config.assets.paths << "#{app.root}/app/cells/#{name}/assets"
+ app.config.assets.paths << "#{app.root}/app/concepts/#{name}/assets" # TODO: find out type.
end
end
# Standard initializer
initializer 'cells.update_asset_paths', &add_paths_block