I'm having some trouble figuring out what the problem is here. Could
you clarify why you want a variable name with spaces?

On Wed, May 27, 2009 at 4:28 PM, fain182 <fain...@gmail.com> wrote:
>
>> "$this->set" uses camel casing
>>
>> so: $post of the month
>>
>> becomes : $postOfTheMonth
>>
>> Hope this helps
> yes, it helps..
> in cakebook ( http://book.cakephp.org/view/189/Automagic-Form-Elements ) says:
>
> "In your controller, set a camelCase plural variable (group -> groups
> in this case, or ExtraFunkyModel -> extraFunkyModels) with the select
> options."
>
> this is not the camelize in Inflector::camelize, because with camelize
> would make singular and first letter capitalized.. for example..
>
> name: post of the month
> camelized: PostOfTheMonth
> camelized + pluralized: PostOfTheMonths
> camelized + pluralized + first letter in lowercase: postOfTheMonths
>
> and this should be the code:
> $field = Inflector::pluralize(Inflector::camelize($field));
> $field = low($field{0}).substr($field, 1);
> $this->set($field, $a);
>
> but it works only for field that doens't contains space... someone can
> help me find the right name to give to set in order to have a select?
>
> thank you!
>
> --
> pietro
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to