Displaying 1 result from an estimated 1 matches for "format_my_string".
2006 Oct 20
7
MVC and modules. Views telling models to behave
...nice if a view could tell a model how to
format it''s data for that particular view.
Kind of like, the view is bestowing instant, and temporary knowledge on the
model for the duration of the views run.
It seemed to me that this would be more objecty than say a helper that
formats a string
format_my_string( my_string )
Instead, in my view. Lets assume I have a Building class that has a
phone_number field
At the top of my view then
<% Building.include PhoneNumberFormat %>
The PhoneNumberFormat module could overwrite the getter methods of
phone_number, fax_number etc to provide me with some...