That is because @products.class is Array, which responds_to? :to_csv. I guess you should call to_csv or whatever method name you have as class method: send_data Products.order(:name).to_csv
I am testing the presence of particular page elements in views and can't figure out where such views testing belongs - controller tests with integrated views or integration tests. Could you elaborate on that a little in the future episodes?
That is because
@products.class
isArray
, whichresponds_to? :to_csv
. I guess you should call to_csv or whatever method name you have as class method:send_data Products.order(:name).to_csv
Ryan, the series is amazing!
I am testing the presence of particular page elements in views and can't figure out where such views testing belongs - controller tests with integrated views or integration tests. Could you elaborate on that a little in the future episodes?
Thanks, Geoff. I was exhausted trying to figure things out.