(Not checkboxes, in my case, but a checkbox example is easy, and more common.)
Originally I thought I needed accepts_nested_attributes_for, but that seems to be mostly for when we're creating the related objects, which I'm not--I need to save relationships to existing objects.
My example (github) uses a simple product/category relationship. We need to get a product's categories, we need to get
Throwing this out there to see what people thing--I suspect there are better, cleaner ways to do this, and I'm wondering what they are.
$.fn.click1 = function(fn) {
$(this).data('clicked', false);
$(this).click(function(o) {
if ($(this).data('clicked')) return false;
$(this).data('clicked', true);
fn(o);
return false;
});
};
(I return false because I know I don't
$.fn.click1 = function(fn) {
$(this).data('clicked', false);
$(this).click(function(o) {
if ($(this).data('clicked')) return false;
$(this).data('clicked', true);
fn(o);
return false;
});
};
(I return false because I know I don't
I'm trying to figure out the "best" way to support discovery of custom validator errors on a Rails 3 model.
My model has both standard and custom validators. I need to check for validation errors from the custom validators, in both controller and template.
My slap-dash solution was to add an additional error message keyed to the field name suffixed with a validator-specific extension. For
My model has both standard and custom validators. I need to check for validation errors from the custom validators, in both controller and template.
My slap-dash solution was to add an additional error message keyed to the field name suffixed with a validator-specific extension. For
I push the command line on people, because it's generally the most efficient way to do several different things. My devs resist me, although I don't understand why... part of it is that most places I've worked at are Windows houses. No problem, say I: Cygwin to the rescue. Seriously, gang, I'm not just making this up.
(I'll grant, however, that there are some Finder/Explorer replacements that
(I'll grant, however, that there are some Finder/Explorer replacements that
Two FB apps, both using FB.ui to publish to a stream. One worked, one didn't, nobody knew why. I needed to know.Nutshell: FB JS code was inadvertently included twice (not by me, which always makes things more difficult). This caused the app_id and app_key values in the FB.ui call to go away--everything else was there, but two pieces critical (obviously) weren't. Note that the app code didn't
Subscribe to:
Comments (Atom)