> "$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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---