There are two ways to lock a user in devise. Using the lockable module Customizing the user account status validation...
When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...
In this example we assume that not only the storage gem changes but also the file structure on disc.
Masonry is a famous library to dynamically arrange a grid of items that have different aspect ratio, like horizontal and...
...HTML's accepts a single file. You can allow multiple files via . But sometimes, selecting multiple files is not enough...
Migrating data from a legacy into a new system can be a surprisingly large undertaking. We have done this a...
Rails defines a #truncate helper as well as a method String#truncate. = truncate("my string", length: 5) = "my string".truncate...
The 90s are calling: they want their tables back. Unfortunately, you need them all for laying out your HTML emails...
Here is how to model basic logic in media queries. AND With keyword and. # Target viewport widths between 500 and...
When you need to store structured data (like Ruby hashes) in a single database column with ActiveRecord, a simple way...
Authentication is a special part of web applications. On the one hand, it usually is a crucial security mechanism restrict...
Using the JS fullscreen API is painful because all browers use different methods and events and you need to use...
For outputting a given String in HTML, you mostly want to replace line breaks with or tags.
When you find yourself constantly ignoring a RubyMine warning, you can simple disable that warning and de-clutter your editor...
geordi delete_dumps [directory] Recursively search for files ending in *.dump and offer to delete those. When no...
Rails offers a way to prepend (or append) view paths for the current request. This way, you can make the...
About-Payments is here to help you to accept payments online and find the best payment service provider for your...
TL;DR Use user.update!(remove_avatar: true) to delete attachments outside of forms. This will have the same behavior as...
This is a small example on how you can check if your Postgres index can be used by a specific...
When you print (or print preview) and elements are cut off (e.g. after 1st page, or "randomly") you should check...
When writing XLSX files, there are gems like rubyXL or axlsx. While they do offer features like formatting or graphs...
Sometimes when working with VCR you still want to use webmock. Since VCR hooks into webmock and fails when an...
An end-to-end test (E2E test) is a script that remote-controls a web browser with tools like Selenium...
Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...