For string columns, MySQL indexes the left side of a string. That means an index can speed a like query...

...record, :match_requests_on).except(:example_group) VCR.use_cassette(name, options) { example.call } end end Behaviour If a spec is not tagged with :vcr, VCR will complain about any attempted HTTP...

...request. This is the default behaviour. If you want to turn this off temporarily, e.g. to communicate with an actual API while writing a new spec, simply add the line...

makandra Curriculum

Understand what Memoization is and when it can be useful. Understand the @variable ||= computation pattern. Learn how to use...

...a? Capybara::Driver::Selenium Now the selenium driver is located by Capybara::Driver::Selenium. A better-looking approach would be: Capybara.current_driver == :selenium page.response_headers['Content-Disposition'] should be page.response.headers...

github.com

When using Sidekiq in your application, you must write thread-safe code. This wiki page also lists gems that are...

...more information about this issue. In Rails3+ you can also disable this annoyingly clever behavior. Why this is bad This has some develish implications for your deployment, because scopes written...

...t notice this during development. Let's say you have a model Note which belongs to an Author and has a string column category: class Note < ActiveRecord::Base

...lockfile carefully when submitting a commit. Note that the approach in this card works best, if you use yarn outdated or npm outdated together with yarn upgrade some_package or...

Some users might use Adblock Plus or similar browser plugins to reduce the number of ads displayed. If you run...

Sidekiq 7 adds a new feature called capsules. Use cases: a chrome queue limited to 1 for e.g. PDF processing...

...all routes, but may return early, a change has been introduced to add lazy behavior by adding an iterator block and yielding. This change breaks the adapter patch in routing...

web.archive.org

...any cleanup yourself. Why? Understand this: before(:context) is run when the context/describe block begins, before(:context) is run outside of transactions, so data created here will bleed into other...

github.com

...API design, I thought it might be nice to write down a set of best practices. And poke fun at a couple widely-used APIs. Much of this may be...

Rails is split into a large number of (sub-) frameworks. The most important and central of those are activesupport (extends...

So your Cucumber feature sometimes dies with this exception: Modal Dialog Present (Selenium::WebDriver::Error::UnhandledAlertError) As a seasoned Selenium...

...GA configurable without changing anything in the application's code base (and much more beyond, see below). Only prefer GTM if the customer requests it, or if he is updating...

...his tracking requirements frequently. The idea behind GTM The "tag" in "Google Tag Manager" has nothing to do with HTML tags, nor with word tags or tag clouds. In the...

Rails' default logger prefixes each log entry with timestamp and tags (like request ID). For multi-line entries, only the...

Removing features and merging those changes back can be painful. Here is how it worked for me.\

en.wikipedia.org

Although you can access many symbols using the AltGr key you may be missing some, like the en-dash (–) or...

open-ui.org

...To do that, we’ll need to fully specify the component parts, states, and behaviors of the built-in controls, as well as necessary accessibility requirements, and provide test suites...

...reinvent common web UI controls to give designers full control over their appearance and behavior. We hope to make it unnecessary to reinvent built-in UI controls, but for those...

Systemd's networkd will drop IP-Addresses configured by other processes like Keepalived's VRRP, when it is restarted. This...

caniuse.com

All major browsers (IE8+, FF3.5+, Safari 4+, any Chrome) support sessionStorage, a JavaScript storage object that survives page reloads and...

No out of the box I18n support for translating the database values But: Better support for the enumerated database type and therefore better suited for performance optimizations

makandra dev

Git has the concept of hooks: bash scripts that are invoked at certain points in the Git lifecycle. One handy...

Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...