Upgrade Rails to 3.2.11

To avoid xmlploitationageddon -
http://weblog.rubyonrails.org/2013/1/8/Rails-3-2-11-3-1-10-3-0-19-and-2-3-15-have-been-released/
Upgrade to Rails 3.2.12
Update bundled gems

I ran `bundle update` to get the latest version of the gems used by this app.

After updating to the latest version of Capybara I got some Ambiguous matcher
errors when clicking on the 'Edit' links. I changed those to 'Edit
transactions' to avoid the ambiguity.
Only setup SendGrid in production env.

This is as recommended in the instructions for migrating from Bamboo to
Cedar Heroku stack.
Specify Ruby 1.9.3 for use on Heroku Cedar stack.
Update schema based on running migrations on empty database.
Remove heroku gem from bundle. I'm now using heroku toolbelt.

There was a conflict with the Gemfile.lock so I reverted to my version and ran
`bundle install` to fix it up.
Update to Rails 3.2.13
Update bundled gems

I ran `bundle update`. This update includes the latest Mocha, which removes
the deprecation warnings (warning: already initialized constant Mocha).
Use Ruby 1.9.3 on Travis

I've been developing against 1.9.3 for a while and have recently[1] updated
the Gemfile so that I use 1.9.3 on Heroku.

[1] cdd42f984978886c3b9fcd535e8d62c2304fa59f
Regenerate app using 3.2.13

I ran `rails new money-tracker` from the parent directory of my money-tracker
app. This overwrote some files and created others that would've been created
if this app had started out on 3.2 (it actually started out on 3.0).

The next step is to use the asset pipeline rather than the static assets I
currently have in public.
Use asset pipeline

* Enabled assets in application.rb

* Moved styles in public/stylesheets/money_tracker.css to
app/assets/stylesheets/application.css

* Moved javascript in public/javascripts/application.js to
app/assets/javascripts/application.js

* Updated application layout to pick up assets files

* Removed outdated jquery libraries

* Removed app/assets/images/rails.png

* Removed public/images/rails.png
Bootstrapify the app

I've used the twitter-bootstrap-rails gem and ran `rails generate
bootstrap:install less` to generate the necessary scaffold.

I removed all my custom styles and then put a couple back in to make the table
look presentable.

I had to update the `xpath_category` helper method as it was checking that the
class attribute was a single value, and it's now 'category label label-info'.
Use Rails' Strong Parameters

I'd never actually got around to enabling
`config.active_record.whitelist_attributes` and now that strong parameters are
here I may as well jump straight to them.
Prettyify the navigation

* Move the 'Edit transactions' link to the right of the page heading, and add
an icon.

* Change the month links to buttons and add chevron icons.

* Add a link to 'View transactions' on the bulk edit page. This either links
back to the month or search results you were viewing.

* Add table borders to search results and bulk edit so that it's consistent
with the index page.
Don't load Rails environment when compiling assets

I don't know why but Heroku has started complaining while compiling the
assets. This article[1] instructs you to set
`config.assets.initialize_on_precompile` to false to get around the problem.
There's more info in the Rails guide[2]

[1] https://devcenter.heroku.com/articles/rails-asset-pipeline#troubleshooting
[2] http://guides.rubyonrails.org/asset_pipeline.html#precompiling-assets
Add autocomplete to category fields

This adds autocomplete to the category field in the bulk edit and single edit
forms.

I'm using jquery-ui-rails as suggested by the jquery-rails README.

I've added a class of 'category' to the input field in the bulk edit form and
single edit form, so that I can add the autocomplete functionality to only
those fields. I've set the minLength to 0 so that you can see all categories,
and the delay to 100 milliseconds so it feels responsive.

I've introduced a Category model, albeit possibly a little prematurely, as I
can imagine normalising the categories in the database.
Remove shoulda

I don't see any advantage of using shoulda. In fact, it prevents me from
running focussed tests in TextMate.

I've had to explicitly add Mocha as it would appear that shoulda included its
own mocking library.
Use Ruby 1.9 hash syntax

I'd started mixing the old and new styles and figure that now would be a good
time to consistently use a single style.
Fade from yellow to white when POSTing AJAX udpates

This used to "just work" but now it would appear to need the jquery.ui.effect
plugin.