Displaying 1 result from an estimated 1 matches for "no_highlight".
Did you mean:
_highlight
2008 Aug 08
2
template.expect_render fails when partial is rendered from a helper
...end
passes if I render the partial directly in the view,
render :partial => ''shared/subnav/home'', :locals => {:active => :home}
but it fails if the partial is rendered by a helper;
module ApplicationHelper
def subnav(partial, args={})
active = args[:active] || :no_highlight
if partial == :home
partial = (logged_in? ? ''home'' : ''login'')
end
render :partial => "shared/subnav/#{partial}", :locals => {:active
=> active}
end
end
Is there any way to check whether the helper renders it?