Wednesday, December 31, 2008

Re: Is it possible to use helper in model?

Your missing the purpose of helpers.

They are meant to manipulate data as it is presented to users within a
view. (show nice dates, currency, trees, etc.)

Within a model you should just handle the data in its current form and
validate against that.

What would you use the number helper for in validation?

On Dec 30, 5:01 am, Hipnotik <Pork...@gmail.com> wrote:
> Hi
> Is it possible to use helper (in example number helper) in model?
> I would like to use it in example in beforeValidate method.
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: