Read the following chapters from The Pragmatic Programmer, anniversary edition (in our library): Chapter 1, Topic 3: Software Entropy...
Your MovieDB gained traction and is now a popular tool among cineasts. This comes with a downside: You noticed a...
To allow HTTP 304 responses, Rails offers the fresh_when method for controllers. The most common way is to pass...
If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...
...can be set by the default rails app generator. Example %w( active_record/railtie action_controller/railtie action_view/railtie action_mailer/railtie action_mailbox/engine ).each do |railtie| require railtie
Simplecov is a code coverage tool. This helps you to find out which parts of your application are not tested...
When redirecting you should take care to use the right HTTP status code. From controllers When redirecting from a controller...
PDFKit converts a web page to a PDF document. It uses a Webkit engine under the hood...
If you are using the routing-filter gem in your Rails 7.1 app for managing URL segments for locales or...
The Basic Authentication header encodes username and password. Effectively, it's just Base64 plus a "Basic" prefix.
Rails default config uses the ActiveSupport::Cache::NullStore and disables controller caching for all environments except production: config.action_controller.perform_caching = false...
Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...
This is a personal post-mortem analysis of a project that was mainly build to provide a REST API to...
Learn to store attachments in a way that is accessible by authorized users only Learn to prevent users from...
Watch Solving bizarre authorization requirements with Rails Read the Consul README Read the assignable_values README Understand how Consul...
Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end
Greg Molnar has written a neat article about creating a single-file Rails app. This is not meant for production...
In order to have monitoring for Sidekiq (like queue sizes, last run of Sidekiq) your application should have a monitoring...
If you want to find out what type of network card is used for a given network interface on a...
You can use constraints in your routes.rb to avoid getting ActionView::MissingTemplate errors when wrong routes are called. Instead, the...
If an view spec crashes due to undefined helper methods, you can enable this option: # config/application.rb config.action_controller.include_all_helpers = true...
Read (or re-read) the following chapters from our book Growing Rails Applications in Practice (it’s in our...
Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...
Authentication is all about being able to verify the identity of a user in the context of our application.