Our applications not only need to be functional, they need to be fast. But, to quote Donald Knuth, premature optimization...

github.com

When a method has keyword arguments, Ruby offers implicit conversion of a Hash argument into keyword arguments. This conversion is...

makandra dev
blog.getbootstrap.com

Moved from Less to Sass. Bootstrap now compiles faster than ever thanks to Libsass, and we join...

aws.amazon.com

I am happy to announce that this information is now available in JSON form at https://ip-ranges.amazonaws.com/ip-ranges.json. The information...

Use form models to handle this problem Or soften the validation to validates_presence_of :parent

makandra dev
getmdl.io

CSS (+ some Javascript) framework, implementing Google's material design for static web pages. Can be used for plain websites without...

Disabling auto-complete in login forms is probably a bad idea, since it encourages weak passwords. If you are still...

Rails comes with grouped_collection_select that appears to be useful, but isn't. As an alternative, consider the flat...

Note: ActiveRecord::Base#becomes has a lot of quirks and inconsistent behavior. You probably want to use ActiveType.cast instead.

github.com

jquery-placeholder is a simple jQuery plugin that enables form placeholders in browsers that do not support them natively, i.e...

To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...

edgeapi.rubyonrails.org

Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...

When using threads, you must make your code thread-safe. This can be done by either locking (mutexes) all data...

blog.carbonfive.com

What if a complicated component comes along that is naturally modeled by multiple directives? This group of directives, as a...

Be careful when using buttons without a type attribute, since browsers will consider them the default submit button of a...

Angular 1.3+ has an alternative getter/setter pattern: You can bind ng-model to an accessor function. This is a function...

blog.phusion.nl

Interesting approach to caching responses directly in the HTTP server, based on the value of an individual cookie.

makandracards.com

Chances are you're seeing the warning repeated a lot of times, maybe thousands of times. Here's how to...

The Angular 1.2 way: # By default, angular returns undefined for invalid attributes which removes # the value from the form field...

askubuntu.com

Adobe no longer supports their PDF reader on Linux and the official page does not offer it for download. \

makandra dev
github.com

An amped-up alternative to Turbolinks that differs in points like this: It's opt-in instead of opt-out...

makandra dev
blog.idrsolutions.com

If you have issues with PDFs, fix them like this: pdftk .pdf output .pdf Background I had an issue where...

vitalets.github.io

Angular-xeditable is a bundle of AngularJS directives that allows you to create editable elements. Such technique is also known...

Modern browsers natively suppport file pickers that allow the user to choose multiple files at once. To activate this feature...