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 Kolb <usenet-072006@tower-net.de> wrote:> 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 > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > 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 <pratiknaik@gmail.com>:> > 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 > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -- For rails performance tuning, see: http://railsexpress.de/blog Subscription: http://railsexpress.de/blog/xml/rss20/feed.xml -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060716/06466bf1/attachment.html