Capybara and most assistive technology will fail to find tags that are missing an href attribute. This will probably happen...

...DateTime.strptime is not what you want You may eventually encounter DateTime.strptime. It's a "better" Time.parse where you can actually define the date format to parse, e.g. >> DateTime.strptime...

...If you use Rails' time_zone_select, you will be juggling zone names like "Berlin" which are actually unsupported. Unsupported zone identifiers are silently discarded and you'll end up...

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

caniuse.com

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

makandra dev

...API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and select the best available source video.currentSrc // The selected source video.currentTime // The current playback time...

...component is using this class to render and modify some html, it may fastly become boilerplate to define every call of the method. Here callFake comes in handy, because it...

...of any dependent on the received arguments without having to know the exact arguments beforehand: spyOn(Random, 'shuffle').and.callFake((array) => array.reverse()) Now you can just assume any result of your...

en.wikipedia.org

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

When using Rails to truncate strings, you may end up with strings that are still too long for their container...

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

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

docs.gitlab.com

Use rules to include or exclude jobs in pipelines. Rules are evaluated in order until the first match. When a...

You can run bundle install in parallel. This might be helpful for development, where you often install many new gems...

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...

makandra dev

This may be awkward to set up, but will work once you're done. Fun facts:

Recently we detected a memory leak in one of our applications. Hunting it down, we found that the memory leak...

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

s keeps saturation unchanged. calc(100 - l) inverts lightness. For example, 0% becomes 100%, and 100% becomes 0%. Example usage .demo { --inverted-color: hsl(from currentColor calc(h...

developer.mozilla.org

...methods usually don't print background colors. In most cases this is the desired behavior, because you don't want to spend tons of ink printing the background of a...

makandra dev

Authentication is a special part of web applications. On the one hand, it usually is a crucial security mechanism restrict...

...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...

...file_inside' do let(:path) { '/opt/invoices/' } it 'should send a requested file that lives beneath the given directory' do subject.should_receive(:send_file).with('/opt/invoices/123.pdf', {}) subject.send :send_file_inside, path...

makandra dev

This card shows you how to center a float horizontally in CSS. Also: find out what techniques are available for...

...lot of logic and callbacks for a particular form screen, but then the model becomes a pain in tests, where all those callbacks just get in the way. Or we...

...have different forms for the same model but they need to behave very differently (e.g. admin user form vs. public sign up form). There are many approaches that promise help...