It is possible to access Rails config (for example secrets) from within your webpack bundles, thanks to rails-erb-loader...

github.com

For Sidekiq to be able to retry your jobs it has to be able to catch errors that occur while...

makandra dev

Cross-Site Request Forgery (CSRF) is an attack pattern for websites. A CSRF attack is usually relevant in a...

A JavaScript error in an E2E test with Selenium will not cause your test to fail. This may cause you...

makandra dev

Geordi provides a pretty neat way to generate beautiful commit messages according to your stories in Linear: geordi commit

Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...

At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...

As a web developer, you know Google Analytics (GA). Probably you've dropped the GA snippet into more than one...

stackoverflow.com

Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...

github.com

Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...

github.com

Recent Bundler (1.16.1) started complaining about missing dependencies in the Gemfile. This is due to a stricter handling of specifications...

You need to update a lof gems. Make sure you don't have any version constraints in your...

When you have a pending Cucumber step (or feature) that also uses an existing VCR cassette, your pending test may...

makandra dev
makandracards.com

Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...

Situation: You want to write a spec for a function inside an Angular service. This function at some point makes...

Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...

gist.github.com

Here is some JavaScript code that allows you to click the screen and get the clicked element's text contents...

You should prefer native promises to jQuery's Deferreds. Native promises are much faster than their jQuery equivalent. Native promises...

github.com

rack-cargo gives your API a new /batch route that lets clients perform multiple API calls with a single request...

github.com

Use Traim to build a RESTful API for your ActiveRecord models with very little code. Traim assumes your API resources...

api.rubyonrails.org

Rails 5 (don't know about the others) comes with an initializer wrap_parameters.rb. Here you can tell rails to wrap...

Put the line below in the respective env.rb file to make your action controllers raise an ActionController::UnpermittedParameters error when...

makandra dev
stdgems.org

Ruby's standard library is in the process of being gemified. It will soon - Ruby 2.5 - consist of RubyGems, which...

chris.beams.io

Separate subject from body with a blank line Limit the subject line to 50 characters (max. 72), include...