Promises are the new way™ to express "Do this, and once you're done, do that". In contrast to callbacks...

When your controller action raises an unhandled exception, Rails will look at the exception's class and choose an appropriate...

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

blog.blockscore.com

#dig lets you easily traverse nested hashes, arrays, or even a mix of them. It returns nil if any intermediate...

The following will search for all .feature files containing a search term and run them using geordi. find features/ -name...

css-tricks.com

All new browsers support the new object-fit CSS property. It allows to specify how an element behaves within its...

makandra dev

Have you ever mistaken one Rails environment for another? The attached helper will help you to never do it again...

to create a Gallery that has a name and has_many :images, which in turn have a...

Spreewald gives you the within meta step that will constrain page inspection to a given scope. Unfortunately, this does not...

When you run rake db:rollback and nothing happens, you are probably missing the latest migration file (or have not...

If you're trying to searching or installing packages via pkg the your repository data might be broken. If pkg...

blog.skylight.io

Helix allows you to implement performance-critical code of your Ruby app in Rust, without requiring glue code to bridge...

Instead of using this hack you might want to use MariaDB 10.x which can work with both old and...

ombulabs.com

Tool to show you which gems are slow to load: ➜ git:(master) ✗ bundle exec bumbler [################################################# ] (49/65) travis-lint...

OAuth requires a set of params to be carried along requests, among which a nonce. Some libraries pass these along...

You can use JavaScript to get or set cookie values on the client. Using the vanilla JavaScript API

makandra dev
github.com

Git commands tend to come in groups. Avoid typing git over and over and over by running them in a...

gist.github.com

The NestedHash class allows you to read and write hashes of any depth. Examples: hash = {} NestedHash.write hash, 'a', 'b', 'c...

explainshell.com

Enter any command into explainshell and it will explain it to you: split into separate commands (if present), with each...

To upload a file via AJAX (e.g. from an ) you need to wrap your params in a FormData object.

Our preferred way of testing ActiveRecord is to simply create/update/destroy the record and then check if the expected behavior has...

Validations should be covered by a model's spec. This card shows how to test an individual validation. This is...

A HTTP 302 Found redirect to PATCH and DELETE requests will be followed with PATCH or DELETE. Redirect responses to...