Do not use .rvmrc files to specify Ruby version and gemset configuration any longer, it's deprecated and not considered...
In contrast to RSpec's included allow_value matcher, the attached matcher will also work on associations, which makes it...
Consul 0.10.0 now allows multiple power mappings for nested resources. When using nested resources you probably want two power
When you're writing migrations that do more than changing tables (like, modify many records) you may want some output...
When two classes implement the same behavior (methods, callbacks, etc.), you should extract that behavior into a trait or module...
Custom matchers are a useful RSpec feature which you can use to DRY up repetitive expectations in your specs. Unfortunately...
Capistrano 2 brings the shell command which allows you to run commands on your deployment targets. There is also invoke...
When you have files in your .gitignore they won't be considered for changes, but still you might want to...
For Capybara, use this step: Then /^"([^"]*)" should be a disabled option for "([^"]*)"(?: within "([^\"]*)")?$/ do |value, field, selector| with_scope(selector...
We tend to use database transactions as a magic bullet to get rid of all our concurrency problems. When things...
Consul 0.9 comes with many new features to optimize powers that only check access to a given record. e.g. Power.current.post...
Use the click method on the DOM element: let link = document.querySelector('a') link.click()
Remember why preloading associations "randomly" uses joined tables or multiple queries? If you don't like the cleverness of this...
1. Saving files to a directory that is not shared between deploys or servers If you save your uploads to...
This card shows how to upgrade a Rails 2 application from Rails 2.3.8 through every single patch level up to...
Active Record's select method allows you to make use of the power of MySQL select statements. On the one...
Merge requests are often rejected for similar reasons. To avoid this, before you send a merge request, please confirm that...
You have multiple options: Just don't have a type column. All STI magic will be disabled automatically.
When you need to find out in which kind of spec you are during run-time, it's definitely possible...
ActiveRecord translations live in locale.activerecord. ActiveModel translations live in locale.activemodel. To use the same translations for both, use YAML references...
Issue this command: sqlite3 ~/Library/Application\ Support/Dock/*.db "DELETE from apps WHERE title='APP_NAME';" && killall Dock This tells sqlite3 to...
This trick might be useful to implement more complicated directives in AngularJS. I needed it to do drag'n'drop...
Authentication is hard: there are many edge cases, and most users (including yourself) usually only go the "happy path" once...
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...