jamis / bucketwise

ATTENTION: This project is no longer being updated. If you're still interested, feel free to read on... "A web-based personal finance manager with a focus on non-OCD budgeting and avoiding credit card debt"

Home Page:http://wiki.github.com/jamis/bucketwise

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deleting an Account with a transfer on it will cause an error when editing the transfer

edavis10 opened this issue · comments

  1. Create Account A
  2. Create Account B
  3. Create a transfer from Account A to Account B
  4. Delete Account B
  5. Transfer still exists
  6. Edit Transfer
  7. Error

Version: 120e981

ActionView::TemplateError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.checking?) on line #8 of app/views/events/_form_section.html.haml:
5:     = account_prompt
6:     = select_account(section, accounts, selected_account && selected_account.id)
7:     - if section_wants_check_options?(section)
8:       %span{:id => "#{section}.check_options", :style => visible?(check_options_visible_for?(section))}
9:         == Check ##{form.text_field :check_number, :size => 6}
10:     - if section_wants_repayment_options?(section)
11:       %span.repayment_options{:id => "#{section}.repayment_options", :style => visible?(repayment_options_visible_for?(section))}

    app/helpers/events_helper.rb:200:in `check_options_visible_for?'
    app/views/events/_form_section.html.haml:8:in `_run_haml_app47views47events47_form_section46html46haml_locals_account_prompt_accounts_form_form_section_multi_bucket_prompt_object_section_selected_account_single_bucket_prompt_title'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render'
    vendor/plugins/haml/rails/./lib/haml/helpers.rb:57:in `non_haml'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render'
    app/helpers/events_helper.rb:313:in `render_event_form_section'
    app/views/events/_form.html.haml:25:in `_run_haml_app47views47events47_form46html46haml_locals_form_object'
    app/views/events/_form.html.haml:22:in `each'
    app/views/events/_form.html.haml:22:in `_run_haml_app47views47events47_form46html46haml_locals_form_object'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:165:in `call'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:165:in `form_for'
    vendor/plugins/haml/rails/./lib/haml/helpers.rb:447:in `call'
    vendor/plugins/haml/rails/./lib/haml/helpers.rb:447:in `haml_bind_proc'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:171:in `form_for'
    app/views/events/_form.html.haml:11:in `_run_haml_app47views47events47_form46html46haml_locals_form_object'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render'
    vendor/plugins/haml/rails/./lib/haml/helpers.rb:57:in `non_haml'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:12:in `render'
    app/views/events/edit.html.haml:8:in `_run_haml_app47views47events47edit46html46haml'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:14:in `render'
    vendor/plugins/haml/rails/./lib/haml/helpers/action_view_mods.rb:14:in `render'
    vendor/plugins/haml/rails/./lib/sass/plugin/rails.rb:19:in `process'

Thanks for reporting this. I just committed a fix in e33f867.