Why app/helpers are not app/view/helpers?

So that we can write controller code inside helpers ? are we supposed
to do that ?

-Pratik

rm -rf / 2>/dev/null - http://null.in

“Things do not happen. Things are made to happen.” - JFK

Pratik wrote on 15.07.2006 14:14:

So that we can write controller code inside helpers ? are we supposed
to do that ?

Because you can have views for HelpersController?!

Use libs if you want to split controller in parts.
And think of private methods in controllers.

Or do you mean anything else?

Markus

That’s what I meant. Why app/helpers are not app/views/helpers, just
like app/views/layouts ? I’ve come across some people practising
writing controller code in respective helpers instead of lib. That’s
why I wondered.

-Pratik

On 7/15/06, Markus K. [email protected] wrote:

Markus


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails


rm -rf / 2>/dev/null - http://null.in

“Things do not happen. Things are made to happen.” - JFK

Helpers are just modules which happen to be automatically included in
views.
But nothing stops you from manually including them into other classes as
well.

For example, you could also include them into into a controller class.

– stefan

2006/7/15, Pratik [email protected]: