Upgrade guide for moving a Rails app from Webpack 3 to Webpack 4

Posted About 5 years ago by Arne Hartherz.

Webpacker is Rails' way of integrating Webpack, and version 4 has been released just a few days ago, allowing us...

Carrierwave: Built-in resize methods

Posted About 5 years ago by Emanuel.

Carrierwave includes some handy helper methods you can use to resize your images. Here is a quick summary of them...

JavaScript without jQuery (presentation from 2019-01-21)

Posted Over 5 years ago by Henning Koch.

We want to move away from jQuery in future projects Motivations are performance, bundle size and general trends for...

How not to turn your application into a spam relay

Posted Over 5 years ago by Tobias Kraze.

Spammers have started abusing other application to send their spam. This works like this: The application has some form that...

Auto-generating plain-text bodies for HTML e-mails in Rails apps

Posted Over 5 years ago by Arne Hartherz.

When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...

Upgrading Ruby from 1.8.7 to 2.3.5

Posted Over 5 years ago by Dominik Schöler.

Suggested Workflow Set the ruby version in .ruby-version to 2.3.5, then perform these steps one by one, fixing errors...

Ruby: Reading and writing CSVs

Posted Over 5 years ago by Emanuel.

In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you...

How to: Use Ace editor in a Webpack project

Posted Over 5 years ago by Arne Hartherz.

The Ace editor is a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby...

How to: expand an element's cover area beyond its container

Posted Over 5 years ago by Arne Hartherz.
codepen.io

Occasionally, your designer will hand you designs where elements break the layout's horizontal container width, like navigation buttons of...

Katapult 0.5.0 released

Posted Over 5 years ago by Dominik Schöler.
github.com

Deployment ready for Opscomplete Copying view and controller templates over to target application during basics configuration or via...

jQuery: How to remove classes from elements using a regular expression

Posted Over 5 years ago by Arne Hartherz.
api.jquery.com

jQuery's removeClass removes the given class string from an element collection. If you want to remove multiple/unknown classes matching...

Accessing Rails config in webpack(er)

Posted Over 5 years ago by Tobias Kraze.

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

Does <html> or <body> scroll the page?

Posted Over 5 years ago by Henning Koch.

Scrolling overflowing elements with JavaScript HTML elements with overflow-y: auto or overflow-y: scroll will get a scrollbar when...

Raising JavaScript errors in Ruby E2E tests (RSpec, Cucumber)

Posted Over 5 years ago by Henning Koch.

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

HTML file inputs support picking directories

Posted Over 5 years ago by Arne Hartherz.
developer.mozilla.org

...HTML's accepts a single file. You can allow multiple files via . But sometimes, selecting multiple files is not enough...

Do not use "flex: 1" or "flex-basis: 0" inside "flex-direction: column" when you need to support IE11

Posted Over 5 years ago by Arne Hartherz.
plnkr.co

Flexbox is awesome. Most of it even works in IE11, but flex: 1 won't work reliably in Internet Explorer...

HTML forms with multiple submit buttons

Posted Over 5 years ago by Henning Koch.

Most forms have a single submit button that will save the record when pressed. Sometimes a form needs additional submit...

Project management best practices: The story tracker

Posted Almost 6 years ago by Tobias Kraze.

In general, the tracker should always be the definitive source of truth of what needs to be done as part...

Chrome bug: Wrong stacking order when transitioning composited elements

Posted Almost 6 years ago by Dominik Schöler.

Google Chrome has a subtle rendering bug that hits me once in a while. It usually occurs in sliders with...

Haml: Generating a unique selector for an element

Posted Almost 6 years ago by Henning Koch.

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

Haml: Prefixing a group of attributes

Posted Almost 6 years ago by Henning Koch.

Haml lets you prefix a group of attributes by wrapping them in a hash. This is only possible with the...

Introduction to Google Tag Manager (for web developers who know Google Analytics)

Posted Almost 6 years ago by Dominik Schöler.

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

Heads up: Rails offers two similar means for text truncation

Posted Almost 6 years ago by Dominik Schöler.

Rails defines a #truncate helper as well as a method String#truncate. = truncate("my string", length: 5) = "my string".truncate...

Designing HTML emails

Posted Almost 6 years ago by Dominik Schöler.
litmus.com

The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...