When delivering non-public uploaded files (images, documents etc), one has to decide whether and how to do authorization. The...
This is a short overview of things that are required to upgrade a project from the Asset Pipeline to Webpacker...
In Rails, we usually have a mailer setup like this: class MyMailer < ActionMailer::Base def newsletter mail to: 'receiver@host.tld',
Many mail clients do not support external style sheets. Some even require all styling inline, which means you'll have...
min-width is known as a CSS property that can be set to define a least width for an element...
When we want to use our own (or bought) fonts in an application with Webpack(er), we have two options...
From at least Rails 4, the ActionView tag helper turns Array values of HTML options into a single space-separated...
Webpacker is Rails' way of integrating Webpack, and version 4 has been released just a few days ago, allowing us...
If you have a PostgreSQL dump in the custom format you can can view the text format dump (plain SQL...
Carrierwave includes some handy helper methods you can use to resize your images. Here is a quick summary of them...
This is a presentation from 2019-01-21. Summary We want to move away from jQuery in future projects
Spammers have started abusing other application to send their spam. This works like this: The application has some form that...
When building an application that sends e-mails to users, you want to avoid those e-mails from being classified...
Suggested Workflow Set the ruby version in .ruby-version to 2.3.5, then perform these steps one by one, fixing errors...
Rails ships with two separate build pipelines: Sprockets ("asset pipeline") and Webpacker. Webpacker has many more moving parts, but allows...
When your code does not behave as expected, you can use a debugger statement ("breakpoint") at any point in your...
In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you...
The Ace editor is a great enhancement when you want users to supply some kind of code (HTML, JavaScript, Ruby...
If your Rubymine does not recognize a file type correctly although you have entered the unmistakeable file extension like material_orders_controller.rb...
Occasionally, your designer will hand you designs where elements break the layout's horizontal container width, like navigation buttons of...
Deployment ready for Opscomplete Copying view and controller templates over to target application during basics configuration or via...
jQuery's removeClass removes the given class string from an element collection. If you want to remove multiple/unknown classes matching...
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...