Looks simpler than inaction_mailer: gem install mailcatcher mailcatcher Setup Rails to send mails to 127.0.0.1:1025. Usually you want...
Rails has the handy controller method send_file which lets us download files easily. We can decide whether the file...
If a Cucumber run deletes your application directory, an integration fail between Capybara and Capybara Screenshot may be the cause...
If you update Selenium regularly, you'll run into deprecation warnings similar to: WARN Selenium [:clear_local_storage] [DEPRECATION] clear...
Debouncing a method call delays its execution until after a specified time has passed. If it's called again before...
...is no longer established using sudo per default. Databases created for local development usually belong to the local user an therefore do not need to be accessed using sudo...
The tree command will show you the contents of a directory and all its sub directories as a tree:
You can unpack a .tar.gz file into the current directory like this: tar -xzvf archive.tar.gz The options used are
To run additional code before an existing Rake tasks you can add a dependency like this: task :before_task...
Rails 6.1 has a "strict loading" mode that forces the developer to preload any association they plan to use. Associations...
Use option:checked to find the currently selected option: select.querySelector('option:checked') Yes, :checked, not :selected. This is the same...
When receiving a new SSL-Certificate for an existing SSL-key it should be checked that they match cryptographically.
A severe bug was found in ImageMagick by Bryan Gonzalez from Ocelot Team. It allows to embed the content of...
Ruby methods which load from a Yaml file, like YAML.safe_load or YAML.safe_load_file, support passing freeze: true to...
...spawns another process to run a browser, it will inherit the environment and also believe it lives in that zone. To do so, run the following code before your test...
...Chrome for Testing if none is found on the system. I worked around this behavior by setting the path to the binary in the selenium initializer Capybara.register_driver :selenium do...
To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...
Partials always define a local variable with the same name as themselves. E.g. when you are in _recent_users.html.erb, a local...
...applications with forms (warp_params will do that for you). But maybe its a better idea to stick to a standard that client libraries know to handle. Tests
...really nice and we implemented it in a similar way like here. In the beginning we tried to remove any duplicated in the schema files. So when a booking had...
Added: State machine can now use the :prefix-option to avoid name collision if you define multiple state machines on...
With this command you can run all the spec files which have been edited or added in the current branch...
If you want to move a complete commit from one repository to another (and you don't want to add...
When a method has keyword arguments, Ruby offers implicit conversion of a Hash argument into keyword arguments. This conversion is...
...is a fix to SafeBuffer#gsub. Note that it will only fix the $1 behavior, not give you a safe string in the end (see below). Example def test(input...
...really expect outside code (read: Gems) to not use $1 (and there is plenty, believe me) when calling gsub on an input that may be a SafeBuffer, you need to...