a1dert/lh-tickets-test — Issue #302: NoMethodError in Demands#index when saving expenses CSV
Author: a1dert
Created: 2011-11-30 12:04:50+00:00
State: open

Imported from lighthouse. Original ticket at: http://redtape.lighthouseapp.com/projects/59696/tickets/298. Created by Alexey Osipenko - 2011-06-03T12:49:30Z

1. Go to Expenses page.
2. Try to save expenses CSV by pressing Save list link.
3. You get an error “NoMethodError in Demands#index”

Details:
Showing /var/www/apps/redtape/staging/releases/20110602120915/app/views/demands/expenses/_index.csv.erb where line #3 raised:
@@@ javascript
undefined method `name' for "Items|Details":String
@@@

Application trace:
@@@ ruby
app/views/demands/expenses/_index.csv.erb:3:in `_app_views_demands_expenses__index_csv_erb___1938023248_60192800_3064652'
app/views/demands/expenses/_index.csv.erb:2:in `_app_views_demands_expenses__index_csv_erb___1938023248_60192800_3064652'
app/helpers/demands_helper.rb:21:in `render_demand_partial'
app/views/demands/index.csv.erb:1:in `_app_views_demands_index_csv_erb___2085047278_60236500_0'
app/controllers/demands_controller.rb:48:in `index'
@@@

Request:
@@@ javascript
{"format"=>"csv",
"model_type"=>"expenses"}
@@@

According to: [story 6065](https://tracker.anahoret.com/projects/44/stories/6065 "story 6065")