On Jul 6, 10:49 pm, Greg Willits <li...@ruby-forum.com> wrote:
>
> I tried this with no joy:
>
> plugin_folder = "#{File.dirname(__FILE__)}"
> ActionController::Base.view_paths.unshift File.join(plugin_folder,
> 'views')
>

How are you trying to use the views in your apps ? If my memory is
correct, setting view_paths means that rails will look in there in
addition to app/views and so on.

However assuming you're in foo_controller, just as normally
render :partial => 'blah' means look for app/views/foo/_blah, adding
to the view_paths means rails will also look for my_plugin/views/foo/
_blah. Were you expecting it to find my_plugin/views/foo ?
I believe these days that if you plugin contains a folder called app,
itself containing a folder called views then that will be added to the
view paths automatically


Fred



> I must be missing something, because the above blog post seems like this
> should be fairly simple.
>
> -- gw
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to