Doesn't Inflector::slug convert the spaces to dashes? I thought it did... Jeremy Burns Class Outfit
jeremybu...@classoutfit.com http://www.classoutfit.com On 19 Apr 2011, at 20:04, cricket wrote: > On Tue, Apr 19, 2011 at 7:44 AM, Jeremy Burns | Class Outfit > <jeremybu...@classoutfit.com> wrote: >> For clarity - I got some of this a bit wrong - here's a better slice of code: >> >> function beforeSave() { >> $this->data['Campaign']['slug'] = >> Inflector::slug($this->data['User']['first_name'] . ' ' . >> $this->data['User']['last_name']); >> } > > It'd probably be better to separate them with a hyphen or underscore, though. > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > 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 -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. 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