Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"no implicit conversion of ActiveSupport::SafeBuffer into Array" if render simple_fields_for in trailblazer cell #27725

Closed
havran opened this issue Jan 18, 2017 · 2 comments

Comments

@havran
Copy link

havran commented Jan 18, 2017

Steps to reproduce

I use simple_form in cells and i want render simple_fields_for on different cell as main form.
In code on which error is raised is variable output as array (which is maybe not wanted here?).
This is maybe not ActiveSupport::SafeBuffer problem but simple_form problem?

Expected behavior

Its should render html output.

Actual behavior

Raise error: "no implicit conversion of ActiveSupport::SafeBuffer into Array"

# block in fields_for_nested_modelactionview (5.0.1) lib/action_view/helpers/form_helper.rb

            options.fetch(:include_id, true)
          }
          @template.fields_for(name, object, fields_options) do |f|
            output = @template.capture(f, &block)
            output.concat f.hidden_field(:id) if output && emit_hidden_id && !f.emitted_hidden_id? # <<< error is raised on this line
            output
          end
        end
        def nested_child_index(name)

System configuration

Rails version: 5.0.1

Ruby version: 2.3.1

@havran havran changed the title "no implicit conversion of ActiveSupport::SafeBuffer into Array" if render simple_fields_for in traiblazer cell "no implicit conversion of ActiveSupport::SafeBuffer into Array" if render simple_fields_for in trailblazer cell Jan 18, 2017
@al2o3cr
Copy link
Contributor

al2o3cr commented Jan 18, 2017

From the error message, it sounds like the @template.capture(f, &block) line is returning an instance of Array rather than the expected buffer.

To troubleshoot this further is going to require either an minimal application that reproduces the error (ideal) or at least the source for the template that's triggering this error.

@rails-bot
Copy link

rails-bot bot commented May 5, 2017

This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails team are limited, and so we are asking for your help.
If you can still reproduce this error on the 5-1-stable branch or on master, please reply with all of the information you have about it in order to keep the issue open.
Thank you for all your contributions.

@rails-bot rails-bot bot closed this as completed May 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants