robj

Results 8 comments of robj

In this case I am creating models from a JSON API. Validations are to ensure I only have valid models even in the case something is not correct server side...

Thanks, As a simple change to validate_presence, would this suffice? def validate_presence(field, value, setting) if(value.is_a?(Numeric || Time || Date)) return true elsif value.is_a?(String) || value.nil? (or just including Time, as...

I'd say in the case a nil date is OK, then it's counterintuitive to use a presence validator at all? > On 6 Dec 2013, at 9:02 am, "s.ross" [email protected]...

currently validates_presence fails validation if the field is not of a numeric or string type. This seems to violate the principle of least surprise if it is not usable on...

I have successfully been able to pass in a compiled mustache template: $('#typeahead-search').typeahead({ minLength: 1, source: { url: '/api/typeahead', type: 'get' }, tmpl: ich.dropdown_template this is using a compiled moustache...