When creating an ActiveRecord with .new, .create or create!, you cannot set the ID attribute (note: When using Machinist's...
There is a bug in ActiveRecord 2.3.x that leads to changes in nested forms getting lost. class Project < ActiveRecord...
About Chrome's network stack and optimizations to load web pages faster.
Ruby has two different ways to match the start and the end of a text: ^ (Start of line) and $ (End...
Defining one callback several times in the same class behaves different in ActiveRecord and ResourceController. While in ActiveRecord the callbacks...
Consul 0.6.1+ gives your Power class a number of static methods that behave neutrally in case Power.current is nil. This...
Consul 0.6.1+ gives you a way to dynamically access and query powers for a given name, model class or record...
validates_uniqueness_of is not sufficient to ensure the uniqueness of a value. The reason for this is that in...
Calling bundle update (without arguments) updates all your gems at once. Given that many gems don't care about stable...
Geordi now has a script that runs capistrano with all known deploy targets (i.e. staging, production...). Use with geordi capistrano...
Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the...
If you say git stash, your stashed changes will be identified with an automatically generated message: $ git stash
When calling a scope like current_power.user?(user), Consul will no longer trigger a query if the users power selects all...
li.active a:link Example output (specificity): | 0 | 2 | 2 | See also: https://www.codecaptain.io/tools/css-specificity-calculator
Axlsx is an incredible gem to generate "Office Open XML" spreadsheet files (XLSX). Does not break on large spreadsheets and...
TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...
jquery-timing is a very useful jquery plugin that helps to remove lots of nested anonymous functions. It's API...
The bash offers control over the behavior of autocompletion. The most primitive example is this (just run it in your...
When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...
If - for whatever reason - you have to render stylesheets dynamically, the following snippet might be of help. It emulates what...
Our old solution for cronjobs, the "craken" plugin, is no longer maintained and does not work on Rails 3.2+.
ActiveRecord has a feature called counter caching where the containing record in a has_many relationship caches the...
For two years we've been using SearchableTrait which gives models the ability to process Googlesque queries like this: Contact.search...
Selenium cannot reliably control a browser when its window is not in focus, or when you accidentally interact with the...