To navigate between test and test subject Rubymine requires you to set the test root sources as Test Sources Root...

Haml 6 has some breaking changes regarding boolean attributes. Only the following attributes and aria/data attributes are considered boolean attributes...

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

Maintaining larger projects makes it more difficult to balance refactoring and upgrade tasks according to its actual value. Consider to...

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

By default most exceptions in Rails will render a 500 error page and will create a new issue in your...

Testing your responses in Rails allows to parse the body depending on the response MIME type with parsed_body.

developer.mozilla.org

Container queries enable you to apply styles to an element based on the size of the element's container. If...

In the past we validate and set default values for boolean attributes in Rails and not the database itself.

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

Rails includes milliseconds in Time / DateTime objects when rendering them as JSON: JSON.parse(User.last.to_json)['created_at'] #=> "2001-01-01...

Ncdu is a disk usage analyzer with an ncurses interface. It is designed to find space hogs on a remote...

Ruby's standard library includes a class for creating temporary directories. Similar to Tempfile it creates a unique directory name...

paweldabrowski.com

The linked content includes a few design patterns implemented with Ruby on Rails. What is the card indented to achieve...

developer.mozilla.org

The inset CSS property is a shorthand that corresponds to the top, right, bottom, and/or left properties. It has the...

SELECT pg_size_pretty(pg_database_size('some-database')); Example SELECT pg_size_pretty(pg_database_size('cards_p')); ----------------

Ruby includes many standard gems that are bundled into the Ruby installation. Here is an example for the gem strscan...

In case you have trouble with the zeitwerk autoloader, you can check out the documentation Autoloading and Reloading Constants and...

tl;dr Since Rails 6.1+ you can use .compact_blank or .compact_blank! to remove blank values from collections (e.g...

If you have a JS fiddle, you can open it in fullscreen by appending /show to the URL. Example: https://...

While verifying doubles in RSpec is a good default, it is limited in the amount of methods it actually is...

Attaching files to a field that is handled by Carrierwave uploaders (or maybe any other attachment solution for Rails) in...

RSpec Rails can automatically mix in different behaviors to your tests based on their type tag, for example enabling you...

makandra dev
ishadeed.com

Table Of Contents Flexbox wrapping Spacing Long content Prevent an image from being stretched or compressed Lock scroll chaining