datasektionen/mage — Issue #71: Sökningen sprängs när man söker specifikt
Author: torandi
Created: 2012-01-04 14:16:29+00:00
State: open
Labels: bug, important

Started GET "/verifikat?utf8=%E2%9C%93&search%5Bactivity_year%5D=1&search%5Bseries%5D=1&search%5Btitle%5D=21" fo
r ::ffff:130.229.152.178 at 2012-01-04 14:13:20 +0000
Processing by VouchersController#index as HTML
Parameters: {"utf8"=>"✓", "search"=>{"activity_year"=>"1", "series"=>"1", "title"=>"21"}}
Tycks inträffa när användaren inte är admin och väljer en serie att söka inom.

Rendered vouchers/_voucher_list_buttons.html.haml (0.2ms)
Rendered vouchers/_voucher_list.html.haml (5.0ms)
Rendered vouchers/index.html.haml within layouts/application (10.7ms)
Completed 500 Internal Server Error in 16ms

ActionView::Template::Error (Mysql2::Error: Column 'series_id' in where clause is ambiguous: SELECT `vouchers`.* FROM `vouchers` INNER JOIN `series` ON `series`.`id` = `vouchers`.`series_id` INNER JOIN `user_accesses` ON `user_accesses`.`series_id` = `series`.`id` WHERE `user_accesses`.`user_id` = 11 AND (bookkept_by_id is not null) AND (activity_year_id = '1' and title like '%21%') AND (series_id = '1') LIMIT 25 OFFSET 0):
21: - if use_long_format
22: %span.correcting
23: %span.enfoldment Omslutning
24: #list_body= render :partial=>"vouchers/voucher_list_row", :collection=>voucher_list, :locals=>{:use_long_format=>use_long_format, :show_delete=>incomplete}
25:
26: =render "vouchers/voucher_list_buttons", :incomplete=>incomplete
app/views/vouchers/_voucher_list.html.haml:24:in `block in _app_views_vouchers__voucher_list_html_haml___1677254110717054524_49290620_123101807036650826'
app/views/vouchers/_voucher_list.html.haml:13:in `_app_views_vouchers__voucher_list_html_haml___1677254110717054524_49290620_123101807036650826'
app/views/vouchers/index.html.haml:15:in `_app_views_vouchers_index_html_haml__2469322881710068742_56753800_2975620993841576039'