I had the same problem and fixed it.
The problem is the way the system trys to change the path of the
template root so it can include it's own templates and partials.
My fix is quick and dirty because I need it working now and elegance
is not on my highest priority list... but here is my fix.
class RoutingNavigatorController < ActionController::Base
routing_navigator :off if respond_to? :routing_navigator
# self.view_paths << File.join(RAILS_ROOT, 'vendor/plugins/
routing_navigator/views')
#for access by the model
def self.view_path
File.join(RAILS_ROOT, 'vendor/plugins/routing_navigator/views')
end
def index
#manually added
self.view_paths << File.join(RAILS_ROOT, 'vendor/plugins/
routing_navigator/views')
@filter = YAML.load(params[:filter].to_s).symbolize_keys rescue
nil
end
def recognize_url
render :text
=> ::ActionController::Routing::Routes.recognize_path(params[:path]).inspect, :layout
=> false
end
def generate_route
render :text
=> ::ActionController::Routing::Routes.generate(YAML.load(params[:options]).symbolize_keys).inspect, :layout
=> false
end
end
#in routing_navigator.rb ~line 32
ActionController::Base.class_eval do
class_inheritable_reader :routing_navigator_options
after_filter :append_routing_navigator if RAILS_ENV == 'development'
# Set what actions the routing navigator after filter is
def self.routing_navigator(options = {})
options = { options => true } if [:off, :on].include?(options)
write_inheritable_hash :routing_navigator_options, options
end
protected
def append_routing_navigator
options = routing_navigator_options || {:off => true}
# yuck!
return if request.xhr? || options[:off] || (!
params[:format].blank? && params[:format] != 'html') || (response.body
=~ /<\/body/).nil? ||
(options[:only] && !
[options[:only]].flatten.collect(&:to_s).include?(action_name)) ||
(options[:except] &&
[options[:except]].flatten.collect(&:to_s).include?(action_name))
# yuck!
# old_template_root = @template.view_paths
begin
@template.view_paths << RoutingNavigatorController.view_path
response.body.gsub!(/<\/body/, @template.render(:partial =>
'routing_navigator/navigator') + '</body')
ensure
@template.view_paths = old_template_root
end
end
end
Try that and it should work.