rails/rails — pull request #6142 by spartan-developer (2012-05-03 13:45:24+00:00)
Title: refactored extracting :size => 'XxY' into an extract_size! method

There were several places where parsing the :size option took 3 lines:

```ruby
if size = options.delete(:size)
options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$}
end
```

I refactored it so now you do this:

```ruby
extract_size!(options, :width, :height)
# OR
extract_size!(options, :cols, :rows)
```