search for: orderheader

Displaying 1 result from an estimated 1 matches for "orderheader".

Did you mean: orders_header
2014 Apr 11
0
Rails 4.1 activerecord_relation conversion to array problem
...m getting this error below. I researched that Rails 4.1 requires a conversion of an activerecord_relation to an array using to_a. I did use to_a but looks like rails is doing a select count behind the scenes. Do you know how to fix this? def index order_type = params[:order_type] @oh = OrderHeader.select("orders_header.*, users.username, users.id as customer_id, users.email, users.phone_work, users.phone_home, users.phone_cell"). joins("INNER JOIN users ON users.id = orders_header.customer_id "). where("orders_header.order_type='#{order_type}'...