I'm building a Rails plugin that currently provides controllers and models to an app. However I get a missing template error when it comes to views. I have the following:
%w{ models controllers views }.each do |dir|
path = File.join(File.dirname(__FILE__), 'app', dir)
$LOAD_PATH << path
ActiveSupport::Dependencies.autoload_paths << path
ActiveSupport::Dependencies.autoload_once_paths.delete(path)
end
The controllers and models are loaded but not views. The Rails guide says it can be done but doesn't have an example. Is there a way to include them (or a similar alternative)?