Hi Steven,
the config file is pure ruby and evaluated like any normal source
file, at the beginning of each render process. So the :unless block
just tells simple-navigation not to render the item if @report is nil,
but it cannot stop the report_areas_path method from being evaluated.
So if you want to avoid the error, you have to do it using a proper
unless statement:
unless @report.nil?
primary.item :areas, "areas", report_areas_path(@report)
end
Andi
> --
> You received this message because you are subscribed to the Google Groups
> "simple-navigation" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/simple-navigation/-/zsLOTvTLZOYJ.
> To post to this group, send email to
simple-n...@googlegroups.com.
> To unsubscribe from this group, send email to
>
simple-navigat...@googlegroups.com.
> For more options, visit this group at
>
http://groups.google.com/group/simple-navigation?hl=en.