Where should I put ruby code for layouts

In my layout folder under views I have saved a common rhml file which is
used by all by views.
How can I call an action from a controller? Probably that isn’t the
right way.
Is there a way to save common ruby code somewhere? And how can I call
for it?

Yes, I’m pretty new to ruby 8)

Fredrik [:all] wrote:

In my layout folder under views I have saved a common rhml file which is
used by all by views.
How can I call an action from a controller? Probably that isn’t the
right way.
Is there a way to save common ruby code somewhere? And how can I call
for it?

Yes, I’m pretty new to ruby 8)

I’d start with application_helper.rb

Methods defined here are callable from inside any view.

A.