filterrific icon indicating copy to clipboard operation
filterrific copied to clipboard

use a more reliable method of determining controller,action

Open lastobelus opened this issue 9 years ago • 2 comments

fixes View Specs

lastobelus avatar Jul 16 '15 06:07 lastobelus

@lastobelus I'm curious to learn how #request.path_parameters[:controller] is more reliable than #controller_name. What's the difference between the two? Is your concern that #controller_name doesn't return namespaces? What if we use #controller_path instead?

Then "OneModule::TwoModule::NeatController" would result in "one_module/two_module/neat" instead of just "neat".

jhund avatar Dec 01 '15 04:12 jhund

@jhund this was a while ago -- as I recall #controller_name was actually not even defined in view specs. Have you tried this with view specs, as a opposed to integration or request specs?

lastobelus avatar Dec 02 '15 05:12 lastobelus