In Ruby on Rails ActiveRecord::Relation#merge overwrites existing conditions on the same column. This may cause the relation to...
...fail with an SQL error due to duplicate index key. You can change Rails' behaviour, by saying class User < ActiveRecord::Base validates_uniqueness_of :name, case_sensitive: false end
...default: 3.0.1) It is still possible to have newer version of a gem installed beside the default version: gem install strscan Fetching strscan-3.0.3.gem Building native extensions. This could take a...
...sends out transactional e-mails to a large number of users, e-mail deliverability becomes an issue. E-mail providers work hard to eliminate spam and have put in place...
...No staging sandbox No permission system for api keys No authentication mechanism for webhooks besides IP ranges Buggy admin UI SendGrid Pro: Very good deliverability Not quite as expensive
...make block elements take up much more space than desired, even stretching their container beyond the screen edge on small screens. min-width is defined to win against competing width...
...will happen and will have effect. But what we can observe is that the behaviour of the callback function :my_method does not happen in the test, as if the...
...i.e. one transaction can see most of what another is doing), and SERIALIZABLE the best (i.e. transactions are very well isolated). Conversely, READ UNCOMMITTED gives you the best performance, while...
...will be the slowest, due to a lot of locking. This also affects locking behaviour and replication performance. The default level is REPEATABLE READ, and it's the mode you...
Due to network or hardware failures, it can happen that one of your cronjobs will not run at the time...
...Although this may be useful for debugging, when writing custom steps you may be better off using XPath...
...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...
Since Rails 7 you are able to encrypt database information with Active Record. Using Active Record Encryption will store an...
...multiple subsequent occurrences of a given character with a single one Use Tap For Better Test Data Setup let(:order) do create(:order, name: "My Order").tap do |order|
When changing glibc versions, it's possible to end up with corrupt indexes in PostgreSQL. Are My Indexes Affected?
For searching in large database tables we usually use PostgreSQL's fulltext search capabilities. While this works reasonably well for...
...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...
Newer versions of Bundler (at least since 2.3) have two different behaviors: If your Gemfile.lock reads PLATFORMS: ruby, it might either install a compatible platform-specific version...
...or similar), bundler will install exactly the versions indiciated in the Gemfile.lock. Fix For better consistency, I would advise to make sure you always have PLATFORMS x86_64-linux
We are using the BEM pattern ("Block, Element, Modifier") to structure our CSS in all new projects. We try to migrate legacy projects to BEM, block-by-block. Read
...it important modifiers start with -? More examples Look at some examples of a good BEM structure in the DOM tree of these websites: https://makandra.de/ https://railslts.com/ https://www.aitiraum.de/
PostgreSQL can cosplay as a full-text search engine. It doesn't have the features or fidelity of ElasticSearch or...
...Just take a step back and evaluate its usefulness first. Also, consider if its benefits outweigh the cost of teaching and maintaining the new thing. Being a good open-source...
...like using the /slackfont command. Fonts need to be installed on your machine. Webfonts beyond those provided by Slack won't magically work unless you install them locally.
ActiveModel supplies an errors object that behaves similar to a Hash. It can be used to add errors to a record, as well as to query the record for registered...
...until we know for sure which image version we will need and the solution becomes very simple. Here is a small helper function for your mailer views: def inline!(version...
...least modularity 3.1.0. Compare implementations Now compare your implementations. Which one do you like best? Does modularity offer features the other approaches don't...
Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...