Forum: Ruby on Rails Controller helpers in app/helpers

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
2ab31489a58f527712d75f36c446a465?d=identicon&s=25 Marcelo de Moraes Serpa (Guest)
on 2009-04-29 00:06
(Received via mailing list)
Hello list,

Originally, afaik, the modules in app/helpers are, by convention, only
to be used as view helpers. With time, however, we ended up by only
them helpers, which can cause some confusion and misconception, since
helpers by itself are not attached to the view layer only. The other day
I've seen a very interesting use of helper folder organization. Instead
putting a rb file in lib, plugins or whatever, my co-worker has created
sorthelper and has put it into app/helpers. Then, he included it in the
controller with include, so, a controller helper. I know it's not a big
deal, but we have been so used to assign the files/modules in
app/helpers to
the view layer that it catched my attention and I though I would share
maybe helpers/ could also be used for little "model helpers"?. Maybe I'm
going too far here :) -- Of course, any insights appreciated :)

A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-04-29 00:54
(Received via mailing list)
If you have many of those (controller extensions) you can just create
an "app/controller_helpers" folder, add it to the load path and be
done with it. Once they grow big and bold enough you can move them to
a simple plugin.

Maurício Linhares (pt-br) |

On Tue, Apr 28, 2009 at 7:05 PM, Marcelo de Moraes Serpa
2ab31489a58f527712d75f36c446a465?d=identicon&s=25 Marcelo de Moraes Serpa (Guest)
on 2009-04-29 01:13
(Received via mailing list)
Thanks Maurício, good idea.

2009/4/28 Maurício Linhares <>
This topic is locked and can not be replied to.