aki77/csb

Rails 7.1 return Enumerator instead of csv contents with config.streaming enabled

taketo1113 opened this issue ยท 2 comments

When using Rails 7.1 and enabled csb config.streaming, it returns the wrong content which rendered only the Enumerator string (Enumerator#to_s) in a csv file.

It seems that the cause is the issue of Rails which doesn't render Enumerator in view correctly in Rails 7.1.
rails/rails#50930

  • rails = 7.1.x / streaming = true : fails
  • rails = 7.1.x / streaming = false : works
  • rails <=7.0.x: works

Expected behavior

It return correct csv file.

Actual behavior

It return csv file which content is #<Enumerator:0xXXXXXX>.

#<Enumerator:0x000000012cd3fd38>

System configuration

  • csb: 0.7.0
  • rails 7.1.3.2
  • ruby: 3.3.0

It seems that the cause is the issue of Rails which doesn't render Enumerator in view correctly in Rails 7.1.
rails/rails#50930

It seems that the Issue will fix next release (rails 7.1.4?)
rails/rails@d8b2e58
rails/rails#51023

Thank you for the information.
It has been fixed in v0.9.0.