The Ace editor is a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby...
When projects run for many years, they require special regular maintenance to stay fresh. This kind of maintenance is usually...
Deployment ready for Opscomplete Copying view and controller templates over to target application during basics configuration or via...
Ubuntu has decided to disable PDF processing because ImageMagick and the underlying Ghostscript had several security issues. When your Ghostscript...
It is very common to parse dates from strings. It seems obvious to use Date.parse for this job. However this...
It is possible to access Rails config (for example secrets) from within your webpack bundles, thanks to rails-erb-loader...
TL;DR: All modern browsers default to using the element as the main document viewport. In CSS, prefer to set...
In this example we assume that not only the storage gem changes but also the file structure on disc.
Rails 5.2 soft-deprecated the storage of secrets in secrets.yml in favor of a new thing, credentials.yml.enc. Rails 7.1 deprecated...
If you use transactional_fixtures or the database_cleaner gem with strategy :transaction, after_commit callbacks will not be fired...
If validations failed for a record, and you want to find out if a specific validation failed, you can leverage...
Let's say you have a gem which has the following module: module SuperClient def self.foo 'Foo' end
We want to keep a changelog for all gems we maintain. There are some good practices for writing a changelog...
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...
Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...
Why secure-only cookies used to be necessary Cookies have an optional secure flag. It tells the browser to not...
Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...
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...
Ruby has this handy block shortcut map(&:to_i) for map { |x| x.to_i }. However, it is limited to argument...
Authentication is a special part of web applications. On the one hand, it usually is a crucial security mechanism restrict...
In an environment: config.logger = Logger.new('/dev/null')
Just like Ruby Gems tag their version releases to the corresponding Git commit, it can be helpful to track production...