Skip to content

Commit

Permalink
Fix Godmin::Resolver on Rails 7 by relying on original implementation…
Browse files Browse the repository at this point in the history
… of _find_all instead of reimplementing it
  • Loading branch information
anderscarling committed May 2, 2022
1 parent 83a560f commit 575802c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/godmin/resolver.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ def initialize(path, controller_path, engine_wrapper)
def _find_all(name, prefix, partial, details, key, locals)
templates = []

template_paths(prefix).each do |p|
template_paths(prefix).each do |template_path|
break if templates.present?

path = Path.build(name, "#{@path}/#{p}", partial)
templates = query(path, details, details[:formats], locals, cache: !!key)
templates = super(name, template_path, partial, details, key, locals)
end

templates
Expand Down

0 comments on commit 575802c

Please sign in to comment.