Proper rails mvc design: question about where to put certain

hi there!

ok heres my problem:
i have a box where i want to display upcoming radio shows. the one
which is currently running plus the n next ones.
so there should be a call to render a (or 2) templates in my main
layout which gets includet in various controllers.

since there is no method of the controller available in the layout i
have to place the logic somewhere else.

i see 1.5 possibilities:
a) components (thats the 0.5, we’ll forget about this right here since
it will be depreciated soon anyway)

b) make 1 or 2 static functions in the model

but im quite sure there is another solution to this problem? is there
a more elegant way to do this?

thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs