Rails now uses .keep files instead of .gitkeep. Running the Rails 4 setup over the top of this existing repo means that I've now got the .keep files. I renamed a couple of the '.gitkeep' files to '.keep', where the equivalent .keep file didn't exist. I found the '.gitkeep' files with: `find . -name ".gitkeep" | grep -v ".bundle"`.
This is similar to the commits that added autocomplete to the descriptions and categories. The difference here is that the set of location options are dependent on the description field, in order to limit the set of possibilities. I wasn't able to use the simple format of `autocomplete` in application.js, as I need to get hold of the description at the time I make the request to get the set of autocomplete suggestions. Setting the `source` option to a string doesn't allow me to do this. I've added an additional 'transaction' class to the form element in the edit template, so that I can target the transaction container given the location field.  d94e1bd  c7a0ca0
Apparently this is required for a Rails 4 app to serve assets in production.  http://stackoverflow.com/questions/15354539/heroku-does-not-compile-files-under-assets-piplines-in-rails-4
Prior to this, I was seeing the following error in the Heroku logs: undefined method `new' for ExceptionNotifier:Module (NoMethodError) The info on upgrading is in the Exception Notifier README.  https://github.com/smartinez87/exception_notification#upgrading-to-4x-version
Running `rake assets:precompile` failed on Heroku (and locally) with the following error: "'fontawesome.less' wasn't found". This change (as per the README) fixes the problem in development and will hopefully do the same on Heroku.  https://github.com/seyhunak/twitter-bootstrap-rails/#icons
I've additionally specified 2.0.0-p247 (which is the version on Heroku) in .ruby-version even though that's not in the repo. All the tests pass on my laptop so I'm hoping they'll pass on Travis and that it'll all just work once deployed to Heroku.  https://devcenter.heroku.com/articles/ruby-support#ruby-versions
Display original date and description on bulk/single edit forms.
The addition of the 'should display original description in the edit form' test in the previous commit caused this test to start failing. The test would pass when run alone, or as part of all transaction controller tests, but it would fail when run with rake. For whatever reason, the addition of the aforementioned test resulted in `Transaction.search 'test description'` returning the transactions in a different order. Once I realised what was happening I focussed on my 'should add a class to the first transaction on a given day' and noticed that it was asserting things about the markup that it couldn't know for sure (i.e. the order in which the transactions would be returned from `Transaction.search`). I've now updated it so that it just checks for the presence of a single `firstOfDay` class.
This is a little clunky but should hopefully be good enough for now. You can upload statements from multiple accounts and they'll be associated with the correct account automatically. The account name (which is only editable through the console) is currently shown against each transaction but I imagine that it'll make more sense to have the transactions index be nested under an account resource in the near future.
*NOTE* After running the migration in this commit, you'll want to update the account_id of the account created, or manually merge the accounts (in the Rails console) after a subsequent import. * The migration creates a generic account and associates all existing transactions with this account. * The `StatementImporter` is responsible for finding or creating the account referred to by the ACCTID field in the OFX file. It's possible I'll want to restrict this further by BANKID in future but the ACCTID should be good enough for now. * Although accounts aren't referred to anywhere in the frontend, it *should* (as of this commit) be possible to upload transactions from multiple banks and not lose any data.
I've fixed most of the warnings generated by rubocop but do have a few left. Those left are either: * 'Line is too long', which I'm not going to attempt to 'fix' in bulk * In the auto-generated db/schema.rb which there's nothing I can do about * In the feature step definitions that I'm planning to change when I change the style of Cucumber in use in the project.