[Solar-talk] Model helpers

Jeff Surgeson solar at 3hex.com
Thu Sep 6 13:35:08 CDT 2007


On Thursday 06 September 2007 17:40:31 Rodrigo Moraes wrote:
> Hey,
> It's nothing new: today I thought that it could also be a good idea to
> have model helpers (much like view, markdown, controller, filter and
> image ones :), and so I implemented it in Tipos_Sql_Model. Oh noes! :)
>
> Use case: I have some models that use the same logic to filter dates
> and fetch within date ranges. I don't want to extend them from a
> common class, neither to duplicate the logic. So I set a helper that
> mainly filter and build the range parameters, and all models can use
> it. One quick example:

Sounds like a good idea to me, definitely something I would use!

-- 
...........::::::...........
Jeff Surgeson / South Africa


More information about the Solar-talk mailing list