In Ruby on Rails, all the routes of a given application can be found within the config/routes.rb file.
When writing some logs to a file, that don't use Ruby's logger utility, it is often useful to...
Here is an example with the --tags option. You need to wrap them inside --cucumber-options option of parallel_cucumber...
Rails middlewares are small code pieces that wrap requests to the application. The first middleware gets passed the request, invokes...
Ruby's File class has a handy method binary? which checks whether a file is a binary file. This method...
If you want to prevent that two processes run some code at the same time you can use the gem...
grep is the go-to CLI tool to accomplish tasks like filtering large files for arbitrary keywords. When additional context...
If you migrate a Rails application from Sprockets to Webpack(er), you can either transpile your CoffeeScript files to JavaScript...
CSP hat zum Ziel einen Browser-seitigen Mechanismus zu schaffen um einige Angriffe auf Webseiten zu verhindern, hauptsächlich XSS...
We use Sentry to be informed about different kinds of issues. One of the key features is that you are...
"Open-source software (OSS) is great. Anyone can use virtually any open-source code in their projects." Well, it depends...
If you have a :string or :text field, you should pair it with a model validation that restricts its length...
Nokogiri is great. It will even fix invalid HTML for you, like a browser would (e.g. move block elements out...
FactoryBot allows to create traits from Enums since version 6.0.0 The automatic definition of traits for Active Record enum attributes...
# Basic HTML example # Javascript API (notable methods and properties) video = document.querySelector('video') video.play() video.pause() video.load() // Reset to the beginning and...
RubyMine has a HTTP Client that can be useful to test web APIs. Just create a .http scratch file an...
In a web application you sometimes have tasks that can not be processed during a request but need to go...
If you render markdown from user input, an attacker might be able to use this to inject javascript code into...
When an event listener on a DOM element throws an error, that error will be silenced and not interrupt your...
Speaker today is Henning Koch, Head of Development at makandra. This talk will be in German with English slides.
We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...
tl;dr Don't forget require 'English' if you use a named global such as $LAST_MATCH_INFO. Otherwise this...
betterspecs.org is a documentation on how to write better RSpec tests. Note that there are also other approaches like The...
With Rspec you can mock objects or functions, for example like this: expect(my_object).to receive(:my_function).and...