piggybak/piggybak_variants — pull request #10 by marcamillion (2013-03-26 11:10:05+00:00)
Title: Changed the 'nil' check to be an absence check

The previous version, was setting `all_selected` to be false if `$(this).attr('value') == ''`. However, ideally what we want is once the selected option's value is blank, we want to display the `span.all_selected` (which the current version doesn't do - but this change does).

The current version was failing that 'blank state' test both on first load, and when the user goes back to the blank state after multiple options are selected.

In this change, on the first page load, the message seen is `You must select a choice from each option`. That message is then seen whenever any required option is left blank, as opposed to just on the first page load. i.e. it now behaves like the user would expect it to behave.