In our continued quest to extract proven code snippets from makandropedia into tested and upgradable gems, we have released Edge...
The Edge Rider gem gives your relations a method #traverse_association which returns a new relation by "pivoting" around a...
TLDR: Ruby class variables (@@foo) are dangerous in many ways. You should avoid them at all cost. See bottom of...
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...
This works well in the simplified case, when your link disappears after it was clicked. Let link_to_remote behave...
When you accept a table in your Cucumber step definition, that table object will have the cryptic type Cucumber::Ast...
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...
Geordi now has a script that runs capistrano with all known deploy targets (i.e. staging, production...). Use with geordi capistrano...
When calling a scope like current_power.user?(user), Consul will no longer trigger a query if the users power selects all...
The way MySQL's FULLTEXT tokenizer splits text into word tokens might not always be what you need. E.g. it...
While you are probably using will_paginate to paginate ActiveRecord scopes, it can actually paginate plain Ruby arrays. The resulting...
Every time you call $(...) jQuery will create a new object. Because of this, comparing two jQuery collections with == will never...
jQuery plugin for equalizing the height or width of elements.
Axlsx is an incredible gem to generate "Office Open XML" spreadsheet files (XLSX). Does not break on large spreadsheets and...
Previous versions of Consul exhibited strange behavior when querying a power that returns nil. Consul 0.4.2+ behaves as expected:
TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...
A jQuery audio player plugin that is responsive and touch-friendly. The UI is css-only, no images used.
jquery-timing is a very useful jquery plugin that helps to remove lots of nested anonymous functions. It's API...
When searching for text in a MySQL table, you have two choices: The LIKE operator FULLTEXT indexes (which currently only...
Our old solution for cronjobs, the "craken" plugin, is no longer maintained and does not work on Rails 3.2+.