...E.g. although an "address book contact" and a "user" are both human beings, it's rarely practical to have them share a model or inheritance hierarchy. Try to model everything...

...CRUD for stands Everything related to viewing and editing weekly reports Read Project management best practices: Issues on how we write user stories. Note that in practice we would do...

...used when you are working on a branch and make a new commits which belongs to a previous commit. If the previous commit is the last commit, you can also...

Even though the process in #1 could be used for this it can become quite tedious if you have a large commit and might have already done this and...

In Rails 8 the behavior of the rails db:migrate command has changed for fresh databases (see PR #52830). Before Rails 8: The command runs all migrations in the folder...

When deleting a record in your Rails app, Carrierwave automatically takes care of removing all associated files. However, the file...

makandra Curriculum

...addresses = AddressBook.new addresses.add Contact.new(first_name: 'Frederik', last_name: 'Foo') addresses.add Contact.new(first_name: 'Berta', last_name: 'Beispiel', phone: '556677') addresses.add Contact.new(first_name: 'Anna', last_name: 'Muster', street: 'Foo...

...returns contacts that match all of the words in any property: results = addresses.search('77 berta') results.size # => 1 results[0].first_name # => "Berta" Errors Change the AddressBook class so the #add...

Starting with ChromeDriver 127, if your application displays a beforeunload confirmation dialog, ChromeDriver will immediately close it. In consequence, any automated tests which try to interact with unload prompts will...

...such dialogs. This means that we want to use the BiDi driver when testing beforeunload prompts. Enabling the BiDi WebDriver Using Capybara, simply set the :web_socket_url option to...

In a project team for a bigger project people have several roles: Developer: at makandra Project lead: at makandra

...feature of Bundler. It might be an unintended side effect of something else. I believe this command will try to update GEMNAME and GEMNAME only. If this leads to unmatched...

makandra Curriculum

...built into RSpec. Play with some of these matchers in your MovieDB tests. The benefits of using better matchers Which of the following two lines is better? Why?

...is often to prefer isolated tests where possible, but share test setup when it becomes excessively complicated or expensive. If we share setup, it is best to do within a...

You want to use fields in your applications. However, your desktop users may encounter some weird quirks: Aside from allowing...

...for Structs are temporary data structures which just hold state and don't provide behaviour. In many cases you could use a simple hash as a data structure instead. However...

...are incredibly fast. If you have to handle lots of data it may be better to use hashes for performance reasons, even if the readability of the code suffers compared...

...addition of both margins takes place but the maximum of both is applied. This behavior is called collapsing margins. Oftentimes it is a good behavior but collapsing margins can be...

...the previous sibling of the parent box. Nevertheless there are some exceptions where the behavior of vertical collapsing margins is not used. Exceptions when margins do not collapse

...in an encrypted YAML file. Usage is simple: each key in the credentials file becomes a method on Rails.application.credentials, returning the corresponding secret. # Credentials file file_storage_secret: superstrongsecret

We have now updated/created two gems that implement the requirements above using the best practices we know of: assignable_values: ActiveRecord macro to restrict the values that may be...

If you are using PDFKit / wkhtmltopdf, you might as well want to use custom fonts in your stylesheets. Usually this...

Whenever you create a table from a database migration, remember to add updated_at and created_at timestamps to that...

It's 2024 and we have tools like ffmpeg, imagemagick and GPT readily available. With them, it's easy to...

github.com

This might be relevant for us since we're often managing customer documents in our apps. I played around with...

...move elements to the back (e.g. background images, gradients etc). They will be rendered behind all other elements within the context (e.g. text), but not behind elements outside the stacking...

The value of the Unicode byte-order character placed at the beginning of the file (BOM). The value given by the charset attribute of the Content-Type...

Your package-lock.json should always match and resolve all packages from your package.json. Coming from Yarn, I was looking for an...

developer.mozilla.org

Today I learned that you can animate HTML elements using the Web Animation API's method .animate(keyframes, options) (which...

getbootstrap.com

...or newer versions for these libraries before you start. Maybe you can upgrade them beforehand which makes the migration easier. Here are some libraries that I had come across:

...implement the navigation on your own. Tip: Add a feature for your navigation bar beforehand and test links and their highlighting (don't forget dropdown submenus!). After upgrading to Bootstrap...

You can use the code below to check whether the browser can make connections to the current site: await isOnline...