Jasmine has spyOnProperty(), but it only works if the property is implemented using getter and setter functions. This is a...

...after hooks. But, just like the default task, it calls update_code at the beginning, symlink to link the "current" path and restart once all done. -- Those are the hooks...

...first update the code and then migrate -- making the deploy:update_code hook the better choice...

In case you want to require a gem, that is not in the Gemfile of you bundle and therefore not...

ariejan.net

...to choose smaller column sizes for performance (it won't matter until your project becomes big, so don't worry about it for now). Integer column lengths, mediumint, bigint, and...

...use this kind of call if your code is run by a background job. Better, don't use it at all. Exception Notifier 2.6 and 3 ExceptionNotifier::Notifier.background_exception_notification...

When you try to remove a non-existing index using remove_index, the migration will incorrectly pass without an error...

...to when precompiling your assets, and give your stylesheets access to all the regular bells and whistles (like asset_path, proper @imports etc): class DynamicStylesheetsController < ApplicationController def show logical_path...

Rails comes with a Rake task notes that shows code comments that start with "TODO", "FIXME", or "OPTIMIZE".

...the first time it was referred to, causing user to be loaded, which Ruby believed it had not seen before. And that caused a completely different spec to fail at...

There seems to be no built-in matcher in RSpec to check if a string contains terms in the desired...

makandra dev

The Capybara API is somewhat hard for parse for a list of methods you can call on a Capybara node...

...you would consider invalid might suddenly make sense for #encode. This very likely works best when your strings are in few languages that share a similar character set, e.g. English...

tl;dr: Do not use merge! for session hashes. Use update instead. Outline Let's assume you're modifying the...

Like you know from "How to tell ActiveRecord how to preload associations (either JOINs or separate queries)", you can tell...

a fraction, with a decimal point before it. I.e., -M5 becomes 0.5, and is thus the same as -M50%. Similarly, -M05 is the same as -M5...

makandra dev
innig.net

If you want to get a deep understanding of how closures, blocks, procs & lambdas in Ruby work, check out the...

makandra dev

Spreewald now has a spreewald binary that lists all available steps, optionally filtering them. Example: $> spreewald # All Spreewald steps

...like text and images. While this may be useful in most situations, it may become annoying in others. If you e.g. want to allow the user to scroll/move horizontally within...

To achieve this goal you have to setup the session store like the following example: MyApp::Application.config.session_store( :cookie_store...

...it with additional joins or conditions. We call this chaining scopes. In practice chaining becomes problematic when scope chains grow more complex. In particular having JOINs in your scope will...

...year is the week with January 4th in it. All days in this week belong to the year. This means that January 1st, 2nd and 3rd may or may not...

...the year. I am not sure which year December days in the same week belong to, I believe the week actually gets split into two calendar weeks in two different...

This will show you how to create a RSS feed that the Feed Validator considers valid. Note that RSS is...

Rails flashes (FlashHash) track a list of used keys, which is not respected when comparing flash hashes.

makandra dev
badssl.com

Website that offers lots of different kinds of HTTPS configurations, bad or good or complicated. They also offer a dashboard...