Guidelines for calling controller methods in helper modules?

Posted by keruilin on Stack Overflow See other posts from Stack Overflow or by keruilin
Published on 2010-05-26T01:08:48Z Indexed on 2010/05/26 1:31 UTC
Read the original article Hit count: 355

Filed under:
|
|

Few questions:

  1. Is it possible to call a controller method in a helper module (e.g., application helper)?

  2. If so, how does the helper handle the rendering of views? Ignore it?

  3. In what instances would you want to call a controller method from a helper? Is it bad practice?

  4. Do you have any sample code where you're calling controller methods in helper?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about controller