zen of coding

Practical use of saveAll() (part 1, working with multiple models)

(Part 2 is here) I would like to provide some insight on how to use the saveAll() method, with a few real-world examples. First, I’m going to cover how to use saveAll() when working with two related models. Imagine we are building a CRM of some sort. We have a[…]

Read More »

notEmpty validation rule

With the recent changeset (https://trac.cakephp.org/changeset/7399) a new, ‘notEmpty’, validation rule is now available. As you can guess, it checks to make sure that a field contains something other than a white space. You will have to upgrade to the latest build, to ensure that this rule is available in your[…]

Read More »

Displaying sort direction in paginated data

Just a little tip on styling your table with paginated data… Wouldn’t it be nice to show to the user what column and direction is currently used for sorting of your data? Here’s how you can do that with a little CSS and some Paginator methods. First, we need to[…]

Read More »
%d bloggers like this: