Git commits should be very deliberate, and only contain changes that you really want to be in there. In order...

makandra dev

Note netstat has mostly been superseeded by its more modern rewrite ss which nowadays comes pre-installed rather than netstat...

...Yourself (or DRY). In Ruby on Rails we keep our code DRY by sharing behavior by using inheritance, modules, traits or partials. When you reuse behavior you want to reuse...

...module that you include in the Cucumber world. This way the module's methods become available to all step definitions. Think of it as enhancing your Capybara API with app...

mail-tester.com

You can use mail-tester.com to check your application's e-mails for issues that might cause e-mails to be...

...hard to understand, the helpers available differ for different versions of Rails and the behavior is subtly different. Make sure you read and understand the API before using these...

The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining...

Background information about session storage in Rails Rails has a default mechanism to store the session in the CookieStore. This...

end end def allowed_mime_types %w(image/jpeg image/png) end end This will behave like the solution before: User#portrait will get an expected error message and the User...

makandracards.com

A general overview about why and how we migrate can be found under Migrating from Elasticsearch to Opensearch

...changes it for the current repository. Since it's hard to remember which project behaves how, you should find a suitable global setting. Regardless which option you use you can...

...current branch. Caveat with current For most of us, current is the safest push behavior. However, it has a small side effect: When a branch with your local name does...

In Capistrano 3, your Capfile requires 'capistrano/rails/migrations', which brings two Capistrano tasks: deploy:migrate and deploy:migrating. The former checks...

mysqlperformanceblog.com

When MySQL refuses to use your index, there's a number of things that you may be doing wrong. One...

Integration tests give the code its rough form, whereas unit tests pinpoint specific behavior. During development, you are frequently changing levels. It may look something like this: Integration _ ___

...usage example, "happy path"> # Add a scenario for each use case. Examples are: error behavior, access rights, contexts, closer looks at parts of the feature Scenario: ... (This example uses Cucumber...

This is a small example on how you can check if your Postgres index can be used by a specific...

While it might be tempting to set it per project (other devs might benefit from it), you need to do it each time for every project "pollute" a project...

It is just not worth the risk and you can always do better. Alternatives Instead, you should take a different approach. Here are several alternatives.

github.com

Note The maintenance mode is enabled on all application server as soon as the file /public/system/maintenance.html is present. Installation

...rough setting (e.g. open Photos with Shotwell Viewer). If a certain file type (or better mime type) should be opened with a different application, this can be set via command...

makandra dev

There are several tools for DNS debugging which offer you more or less information. Most of the time the more...

Why do we migrate? Due to a change in licensing, we cannot provide Elasticsearch versions >= 8.0. Version 7.17.x will...

...for all exceptions (previously true) :none: It will raise for all exceptions (previous default behavior, value false) Using the new default needs to change a RSpec test like this:

thegnar.com

...instead of using a more costing feature spec. This is especially useful because they become quite convenient when used with Capybara::Node::Finders and Capybara::RSpecMatchers. This allows to wirte...

...view might be too isolated, since view-specs will mock a lot of rails behavior and render the view independent from the controller-logic. Therefore it will be more applicable...

This still relies on params[:id] existing, so your code should reflect that: # Better User.find(params.expect(:id)) # Or User.find(params.require(:id)) Avoiding issues with extra parameters Rails logs extra...

...should still use permit (or expect) to receive Strong Parameters, but strip extra parameters. # Better (option 1) redirect_to users_path(params.slice(:query, :encoding).permit(:query, :encoding)) # Better (option...

available for button, fieldset, input, select, textarea, command, keygen, optgroup, option Browser specific behavior: IE 11: text inputs that are descendants of a disabled fieldset appear disabled but the...