When you allow file uploads in your app, a user might upload content that hurts other users. Our primary concern...

Rack::SteadyETag was a Rack middleware that generates the same default ETag for responses that only differ in XOR-masked...

Every Rails response has a default ETag header. In theory this would enable caching for multiple requests to the same...

When you're using a third party repository on your Ubuntu or Debian system and need to find out which...

Haml 6 was a major rewrite with performance in mind. To achieve a performance improvement of 1.7x, some design...

Capybara has a variety of finder methods like find_button to help you look up DOM elements. There are also...

Usually you add errors to :base in ActiveRecord, in case no appropriate attribute could be used to add the error...

Let's say we have posts with an attribute title that is mandatory. Our example feature request is to tag...

Rails offers the fresh_when method to automatically compute an ETag from the given record, array of records or scope...

By activating strict_loading you force developers to address n+1 queries by preloading all associations used in the index...

github.com

Since Ruby 3.2.0 you can measure coverage support for eval statements and support has been added for the simplecov gem...

The change_column method for rails migrations support casting with a custom SQL statement. This allows us to change a...

When a nginx reverse proxy complains about upstreams sending too big headers, tweaking the buffers responsibly can help to prevent...

makandra dev

Rails partials have a lot of "hidden" features and this card describes some non-obvious usages of Rails Partials.

Not all email clients support external images in all situations, e.g. an image within a link. In some cases, a...

Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...

Sometimes I ran across a GitHub merge request of a gem where it was not completely obvious in which version...

In Rails 5+ you can access a helper from a controller using the helpers method: # Inside a controller action

thepugautomatic.com

How a macro can dynamically define a method that can be overridden with super in the same class.

makandra dev
ruby-doc.org

TLDR if you define a equality method for a class you must also implement def hash. Ruby has a lot...

makandra dev

In a Jasmine spec you want to spy on a function that is imported by the code under test. This...

There are cases where we have multiple exported resources that are identical. There are nodes that provide the same services...

In Puppet, there are some differences between defined and function types when it comes to code encapsulation. In most cases...

Erfülle die Aufgaben Zeige deinem Mentor in einer Live-Demo was du umgesetzt hast. Wenn du Aufgabe 4 betrachtest...