Sometimes you need complex expectations on method arguments like this SomeApi.should_receive(:find).with(:query => '*foo*', :sort => 'timestamp ASC', :limit...
We use CarrierWave in many of our projects to store and serve files of various formats - mostly images. A common...
There was an issue with makandra_sidekiq < 0.2 concerning the stopping of Sidekiq. Sidekiq < 6 has two finishing timeouts: one...
...might have a negative impact on your application's performance. We did not yet benchmark it, but using it for elements that are rendered very often is probably a bad...
Suppose you want to implement a publish/subscribe pattern in your Frontend application to react to data changes and events. First...
In order to request a SSL certificate from any dealer, you usually need a CSR certificate. As both the CSR...
The ancestry gem allows you to easily use tree structures in your Rails application. There is one somewhat unobvious pitfall...
...nested, :inverse_of => :parent accepts_nested_attributes_for :nested end class Nested < ActiveRecord::Base belongs_to :parent validates_presence_of :parent_id # <- end With the parent already persisted creating nesteds...
...soften the validation to only validate on the associated object: class Nested < ActiveRecord::Base belongs_to :parent validates_presence_of :parent # <- without `_id` end Drawback With this softened validation now...
Angular comes with different types of services. Each one with its own use cases. All of these services are singletons...
...origin (e.g. git fetch and git status). You should be 0 commits ahead or behind. Add and commit a file touch .please-update git add .please-update
...is no way to make GitHub do this nicely. :( If you know of a better approach, please let me know...
If you want to make your Rails application be capable of sending SMTP emails, check out the action mailer configuration...
...MKV container, H.264 codec, "0" constant rate factor and "veryslow" preset results in the best video quality. Peek Note The original peek project has been deprecated. If you are experiencing...
...feature-set to the original peek. If you don't insist on high the best video and you don't need audio recording, you could also use Peek, which is...
FactoryBot allows to create traits from Enums since version 6.0.0 The automatic definition of traits for Active Record enum attributes...
Using git rebase can be painful but luckily you can resort to cheating with git reset and committing anew.
We recently had a problem on a Memcache cluster, where one of the servers showed a significantly worse cache hit...
...ES5. This means that examples for transpiled results or the "Try CoffeeScript" web console behave differently, and lookup up stuff when working on older projects may be somewhat hard.
Sometimes, through some firewall or proxy misconfiguration, you might have to deploy to a server that cannot access the git...
Note: We are talking about Machinist 1 here, Machinist 2 may have solved this or might require a different approach...
tl;dr You can use attribute? as shorthanded version of attribute.present?, except for numeric attributes and associations. Technical Details
Using this step definition you can check if any form field (text field, checkbox, etc) or button is disabled:
This should be fixed in the latest LTS-branches of our mysql2 fork, 0.2.x-lts and 0.3.x-lts...
...an error out of stale_session_check! if it cannot find all classes. The best way to go: Don't do this. Strings and numbers should be enough and if...
All browsers + IE9 know the CSS :empty selector. It lets you hide an element when it has no content, i.e...
I had a very frequent cronjob that in rare cases could be relatively slow. To avoid multiple instances of this...