Note: This technique is confusing and slows down your test suite. Copy the attached code to features/support. This gets you...
Say you want to allow users to emphasize some string, but the whole markdown thing would be far too much...
Rails’ reputation as a relatively secure Web framework is well deserved. Out-of-the-box, there is protection against many...
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.
Here is a hacky way to load dumps directly from the source server, without fully copying them over and extracting...
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...
Prepare to explain customers what changed if your application renders PDF documents to users.
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...
With the impending release of Ruby on Rails 4, it looks like a lot of developers will be updating their...
Examples how to create dozens of shapes using pure CSS and a single HTML element.