Removing the Engines dependency from Cells
[Update, March 25, 2008: Engines is now optional in the trunk of Cells.]
It seems that the Engines dependency in Cells is unnecessary, so I have documented the steps to remove it. You may want to wait for Nick Sutterer to commit this change to the svn repository, but if you are anxious to do it right away, here is what you need to do.
In vendor/plugins/cells_plugin/lib/action_view_extensions.rb, line 87, remove this block:
# Otherwise, check in the plugins to see if the template can be found there. # Load this in order so that more recently started plugins will take priority. Rails.plugins.by_precedence do |plugin| plugin_specific_path = File.join(plugin.root, 'app', 'cells', template_path.to_s + '.' + extension.to_s) return plugin_specific_path if File.exist?(plugin_specific_path) end
Next, in line 76, replace this:
if Engines.disable_application_view_loading path_in_app_directory = nil else path_in_app_directory = File.join(RAILS_ROOT, 'app', 'cells', template_path.to_s + '.' + extension.to_s) end
path_in_app_directory = File.join(RAILS_ROOT, 'app', 'cells', template_path.to_s + '.' + extension.to_s)
Also, remove line 40 of the Cells plugin’s init.rb, which reads:
Then, remove line 32 of init_engine.rb:
Engines.current.version = Cells::VERSION
That is it! No more Engines dependency. You can go ahead and delete the Engines plugin folder from your project.