Rails: render a partial from a plugin
Posted
by Sam
on Stack Overflow
See other posts from Stack Overflow
or by Sam
Published on 2010-03-15T10:34:20Z
Indexed on
2010/03/15
10:49 UTC
Read the original article
Hit count: 275
I'm getting a missing template error after I try rendering a partial from a plugin. I have included the files with the following:
%w{ models controllers helpers views }.each do |dir|
path = File.join(File.dirname(__FILE__), 'app', dir)
$LOAD_PATH << path
ActiveSupport::Dependencies.load_paths << path
ActiveSupport::Dependencies.load_once_paths.delete(path)
end
The Models are getting loaded, but as for other things I'm not sure what's going on. The helpers are not getting loaded too because I just copied the contents of the partial from the plugin instead of the render :partial => and then it came up with a helper error.
Question is how to be able to :render :partial => from the views folder in my plugin
© Stack Overflow or respective owner