Rails flash hash violation of MVC?

Posted by user94154 on Stack Overflow See other posts from Stack Overflow or by user94154
Published on 2010-01-08T01:42:29Z Indexed on 2010/04/07 17:03 UTC
Read the original article Hit count: 335

Filed under:
|
|

I know Rails' flash hash is nothing new, but I keep running into the same problem with it.

Controllers should be for business logic and db queries, not formatting strings for display to the user. But the flash hash is always set in the controller. This means that I need to hack and work around Rails to use Helpers that I made to format strings for the flash hash.

Is this just a pragmatic compromise to MVC or am I missing something here?

How do you deal with this problem? Or do you not even see it as one?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about flash-hash