Displaying 1 result from an estimated 1 matches for "phone_cel".
Did you mean:
phone_cell
2014 Apr 11
0
Rails 4.1 activerecord_relation conversion to array problem
...se 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}' and
orders_header.customer_id=#{session[:user_id]}").
order("id desc").
paginate(:per_page => 10, :pa...