After updating Rubygems you see a wall of deprecation warnings like this: NOTE: Gem::SourceIndex#add_spec is deprecated, use...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
When your JavaScript bundle is so massive that you cannot load it all up front, I would recommend to load...
Unpoly's [up-observe], [up-autosubmit] and [up-validate] as well as their programmatic variants up.observe() and up.autosubmit...
Capybara added a deprecation warning in version 3.35.3 (version from 2019) that shows up if your selector is not of...
When storing files for lots of records in the server's file system, Carrierwave's default store_dir approach may...
...issue with this pattern/approach. What's happening? Consider these classes: class Post < ActiveRecord::Base belongs_to :thread def thread_title thread.title end end class Thread < ActiveRecord::Base has_many :posts...
...post.thread is not actually a Thread even though looking at its class makes you believe so: post.thread.class => Thread Its real class is ActiveRecord::Associations::BelongsToAssociation which is sometimes exposed, for...
...being used by default (which may be annoying). Here is how to do that. Beware: By following the steps below, you will drop and recreate your cluster. You will lose...
...As an example, we will be modifying 9.5 main (running on port 5435) below. Become a PostgreSQL superuser sudo su postgres Backup entire database pg_dumpall -p 5435 > 5435.sql
If you are using scrum in a project you might be familiar with planning poker, a playful way to agree...
When such a virtual attribute should contain integer values you might get unexpected behavior with forms, because every param is a string and you don't get the magic...
...guest from the CD, open a terminal (on the guest, not the host!) and become root: sudo su fdisk -l to see the disk information. \ There should be one drive...
accepts_nested_attributes_for :children validates_associated :children end class Child < ApplicationRecord belongs_to :parent, inverse_of: :children end class Child::AsForm < ActiveType::Record[Child] change_association :parent...
...AsForm record with nested Child::AsForm records, the children will not be saved. This behavior also applies to the case where you override the association with has_many :children,...
...and...
This note describes how to kick a user out of a Rails application after she hasn't requested an action...
tl;dr: Use event.currentTarget unless you are absolutely certain that you need event.target. Since it hasn't been written down...
By default, Devise redirects to a sign-in form when accessing a route that requires authentication. If for some reason...
Within Capybara you most certainly use the #check- and #uncheck-method to (un)check checkboxes. But there's one problem...
RubyMine offers you to exclude directories from search, meaning faster search results and less "noise" in the list of result...
Sometimes, the rails dev server doesn't terminate properly. This can for example happen when the dev server runs in...
...should see the following ([\w]+) table:?$/ do |name, expected_table| name = name.underscore table_element = begin element_at("table\##{name}") rescue Webrat::NotFoundError begin element_at("table.#{name}") rescue element_at...
...a "add new user" forms. Chrome developers say this is by design as they believe it encourages users to store more complex passwords. Recommended fix for Chrome and Firefox
The cards editor has a feature "Cite other card" to create links to other cards in the same deck as...
Capybara allows you to select DOM elements, e.g. by using field, find_field(...) or field_labeled(...): role_select = field_labeled...
...a lot more, you can think of it as a "Browserstack for mail clients". Best practices Use tables for layouting. Use these HTML attributes: align="center", width="100%", valign="top...
...In a second tab, open a preview of your designed HTML mail. It's best to take it from Staging, so that assets (images!) will be available to litmus during...
On your local system that only hosts non-critical development data and only you have access to, you can store...