activescaffold/active_scaffold — Issue #114: to_label belongs in the view, not the model
Author: aspiers
Created: 2012-01-09 01:23:02+00:00
State: open

Based on [this description from the wiki](https://github.com/activescaffold/active_scaffold/wiki/Describing-Records%3A-to_label), `to_label` is very much concerned with presentation rather than the underlying data model, so it seems to belong in the view layer (e.g. in helpers) rather than in models. In the past this has caused me trouble when I wanted the label to be something more complicated than a trivial string, because then I faced an ugly choice: put view-related code directly in the model, or put it in a helper and then include the helper in the model.

Maybe I'm missing something, but if not, I would like to see ActiveScaffold offer a cleaner way of labelling which does not pollute the model, followed by deprecation of this mechanism.