Next time you have to do more than trivial CSS changes on a project, you probably want to have live...
Set the hash to a dummy hash which doesn't hit any id at your page, for example: window.location.hash = "_";
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...
Here is a good explanation for zombie processes. Quote: If you have zombie processes it means those zombies have not...
Merge requests are often rejected for similar reasons. To avoid this, before you send a merge request, please confirm that...
The Ruby on Rails security list archive can be found here: http://groups.google.com/group/rubyonrails-security You can subscribe to this mailing...
Back in the old days, we couldn't do something like that: .foo { position: absolute; bottom: 0; /* This was bad...
Capybara drivers will usually delete all cookies after each scenario. If you need to lose cookie data in the middle...
In order to clone a git repository including all branches and tags you need to use two parameters when cloning...
When you need to find out in which kind of spec you are during run-time, it's definitely possible...
Sometimes you need a piece of code to do something different for specs than for features. If you don't...
When your site is on HTTPS and you are linking or redirecting to a HTTP site, the browser will not...
git shortlog -s -n [commit-range] -n, --numbered Sort output according to the number of commits per author
We have often felt the pain where our models need to serve too many masters. E.g. we are adding a...
In the following example the method update_offices_people_count won't be called when office_id changes, because it...
We ran into trouble when adding additional compute units to our railscomplete Hosting environment lately. VM-instances on the new...
tl;dr: Ruby's Bundler environment is passed on to system calls, which may not be what you may want...
Rails gives you migrations to change your database schema with simple commands like add_column or update. Unfortunately these commands...
Caution when using .where to exclude records from a scope like this: # Fragile - avoid User.where("id NOT IN (?)", excluded_ids...
This only works when you actually have a session ID (not the case for Rails' CookieStore, for example): request.session_options...
In specs, the session never persists but is always a new object for each request. Data put into the session...
All columns of a model's database table are automagically available through accessors on the Active Record object.