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

undefined method `each_with_object' #70

Closed
jagthedrummer opened this issue Nov 13, 2023 · 2 comments · Fixed by #71
Closed

undefined method `each_with_object' #70

jagthedrummer opened this issue Nov 13, 2023 · 2 comments · Fixed by #71

Comments

@jagthedrummer
Copy link
Contributor

jagthedrummer commented Nov 13, 2023

Seeing some test failures in CI that look like this:

Api::OpenApiControllerTest
  test_OpenAPI_document_is_valid                                 ERROR (0.75s)
Minitest::UnexpectedError:         ActionView::Template::Error: undefined method `each_with_object' for #<ActionText::RichText id: nil, name: "action_text_value", body: #<ActionText::Content "<div class=\"trix-conte...">, record_type: "Scaffolding::CompletelyConcrete::TangibleThing", record_id: nil, created_at: nil, updated_at: nil>
            /home/circleci/project/bullet_train-super_scaffolding/app/views/api/v1/scaffolding/completely_concrete/tangible_things/_tangible_thing.json.jbuilder:1
            /home/circleci/project/bullet_train-api/app/helpers/api/open_api_helper.rb:62:in `automatic_components_for'
            app/views/api/v1/open_api/index.yaml.erb:24
            /home/circleci/project/bullet_train-api/app/controllers/api/open_api_controller.rb:12:in `index'
            /home/circleci/project/bullet_train/app/controllers/concerns/controllers/base.rb:95:in `set_locale'
            test/controllers/api/open_api_controller_test.rb:10:in `block in <class:OpenApiControllerTest>'

https://app.circleci.com/pipelines/github/bullet-train-co/bullet_train-core/2211/workflows/6596d3b8-2dbe-44d3-9e44-20b53e642621/jobs/7121?invite=true#step-119-23492_26

Apparently we don't have this gem locked down in BT like I had hoped. It still seems like it floats to the latest version in CI.

@jagthedrummer
Copy link
Contributor Author

Guessing it's either here:

merged_array = array_indices.each_with_object([]) { |i, arr| arr.concat(value[i]) }

Or here:

value.each_with_object({}) do |(attr_name, attr_value), properties|

@newstler
Copy link
Contributor

Fixed in 2.6.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants