When HTTP clients make an request they can define which response formats they can process. They do it by adding...
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...
Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...
Say you want to allow users to emphasize some string, but the whole markdown thing would be far too much...
view_context.helper_method('args') Rails 2 ApplicationController.helpers.helper_method('args') Also see How to use helper methods inside a model...
The way Rational#to_s works on Ruby has changed from Ruby 1.9 on. Here is how to get the...
When a controller action redirects to an external URL (like http://somehost.com/some/path) you will find that this is hard...
Great look at the tradeoffs between progressive enhancement with jQuery or similiar, vs. client-side views.
This error can happen in Ruby 1.9. To fix it, add the following line to the top of your .js.erb...
JavaScripts and CSS should be minified for production use. In Rails 3.1+ the asset pipeline will take care of this...
If you need to capture signatures on an IPad or similar device, you can use Thomas J Bradley's excellent...
In our continued quest to extract proven code snippets from makandropedia into tested and upgradable gems, we have released Edge...
TLDR: Ruby class variables (@@foo) are dangerous in many ways. You should avoid them at all cost. See bottom of...
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...
Spreewald now comes with a step that tests if a form field is visible: Then the "Due date" field should...
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...
Apache HTTP server benchmarking tool (ab) is a nice tool to test performance on sites delivered by HTTP. If the...
So you want to find out how many horizontal pixels you have available on a mobile device. This is super...
Examples how to create dozens of shapes using pure CSS and a single HTML element.
You can define methods in any example group using Ruby's def keyword or define_method method. These helper methods...
As attachments to this card you will find a Cucumber feature and supplementing step definition that you can use to...