Displaying mapped values from the database

Why aren't they Text* already in the database?

-- fxn

Optimization, it is really worth the trouble? That corner of the appliccation now is not smooth.

Anyway, the getter cannot be redefined for that purpose because it is used by AR to read attributes to save them, and you need the conversion only towards the view. (Kernel.caller hacks notwithstanding.)

An ad-hoc getter would be OK:

   def foo_without_database_optimization
     "Text#{foo}"
   end

that one would be called in views instead of the real getter.

-- fxn