At makandra, we've built a few gems over the years. Some of these are quite popular: spreewald (> 1M downloads...
For webpages to load fast it's recommended to optimize images. Ideally an image's file size should be as...
Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...
If you want to fill in textareas with multiple lines of text (containing line breaks / new lines) you can use...
Whenever is a Ruby gem that provides a nicer syntax for writing and deploying cron jobs. Leading zeros are important...
Authentication is a special part of web applications. On the one hand, it usually is a crucial security mechanism restrict...
Browsers' printing methods usually don't print background colors. In most cases this is the desired behavior, because you don...
A matcher is a function that returns an object with a compare key. Usually it is registered with beforeEach...
TL;DR Append your locale keys with _html to have them marked as html_safe and translate them with = t...
For outputting a given String in HTML, you mostly want to replace line breaks with or tags.
CarrierWave comes with some RSpec matchers which will make testing more comfortable. Let's say you have an Uploader like...
When you need test images, instead of using services like lorempixel or placehold.it you may generate test images yourself.
Don't sum up columns with + in a sql-query if NULL-Values can be present. MySQL and PostgreSQL cannot...
Rails offers a way to prepend (or append) view paths for the current request. This way, you can make the...
When you have string contents (e.g. a generated binary stream, or data from a remote source) that you want to...
Form fields can be rendered as noneditable by setting the disabled or the readonly attribute. Be aware of the differences...
With passenger-status --show=requests you can get a huge JSON showing current information about the running passenger processes.
Sometimes it's necessary for you to check which ports are in use on your local machine and which process...
Understanding your type of cronjob Some cronjobs must only run on a single server. E.g. when you run nightly batch...
If one etcd node is no longer a member of the remaining etcd cluster or fails to connect you need...
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...
The issue: You are using stub_const to change a constant value for your test. stub_const "SomeClass::CONST", 'test...
Rails applications and ruby gems should have a README that gives the reader a quick overview of the project. Its...