Skip to content

Commit

Permalink
Fix compatibility with JBuilder 2.11.3
Browse files Browse the repository at this point in the history
Turn enumerables into arrays since JBuilder
2.11.3 (rails/jbuilder#501) requires
collection to respond to `empty?`, which `Enumerable` does not
provide. See also rails/jbuilder#514

REDMINE-19357
  • Loading branch information
tf committed Nov 24, 2021
1 parent 64c0781 commit 68af326
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/helpers/pageflow/page_types_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module PageTypesHelper

def page_type_json_seeds(config)
render_json_partial('pageflow/page_types/page_type',
collection: config.page_types,
collection: config.page_types.to_a,
as: :page_type)
end

Expand Down
2 changes: 1 addition & 1 deletion app/helpers/pageflow/themes_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def themes_options_json_seed(config = Pageflow.config)

def theme_json_seeds(config)
render_json_partial('pageflow/themes/theme',
collection: config.themes,
collection: config.themes.to_a,
as: :theme)
end
end
Expand Down

0 comments on commit 68af326

Please sign in to comment.