calling methods through rhtml (layout)

hello

I have a menu with some logic. I want to call a method in my rhtml
layout file, so that I can get an array with items for displaying
through a
for statement.

I tried to put my logic at ApplicationController but it seems that I
am not able to see the method when I try to call it through rhtml.

I would like some advice about this subject,

Thanks in advance