Not to be annoying, but does anyone have any ideas?
On 8/14/06, Kyle Slattery <slattery@fidgeting.net>
wrote:>
> Hi all,
>
> I currently have a partial named _menu, where I generate the menu for my
> site. I pass locals to it with a render :partial. I have the partial
check
> for 2 items, display_title and klass. I only pass these to the partial if
I
> need to use them, otherwise no locals named display_title or klass are
> present in the partial. I test to see if these exists by doing the
> following:
>
> <% unless display_title == false %><h3><%= title
%></h3><% end %>
>
> <ul class="<%= !klass.nil? ? klass : ''menu''
%>">
>
> This has worked for a little while, but recently it no longer worked--I
> got an "undefined local variable or method" error. I can
understand why
> maybe the first method may not be working, but the second should work. I
> didn''t change anything other than restarting the server before I
started
> having the issues.
>
> Am I doing something completely stupid? If I haven''t been too
clear on
> what the problem is, let me know, and I''ll try to explain a little
better.
>
> Thanks,
> Kyle
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060815/a99ca011/attachment-0001.html