Commit 299fbfe0ad241773e7bf00685711d9e10b91ef36
1 parent
e1fa81e8
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Fix the path order to search for partial views
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -304,7 +304,7 @@ module ApplicationHelper |
304 | 304 | def partial_for_class(klass, prefix=nil, suffix=nil) |
305 | 305 | raise ArgumentError, 'No partial for object. Is there a partial for any class in the inheritance hierarchy?' if klass.nil? |
306 | 306 | name = klass.name.underscore |
307 | - controller.view_paths.reverse_each do |view_path| | |
307 | + controller.view_paths.each do |view_path| | |
308 | 308 | partial = partial_for_class_in_view_path(klass, view_path, prefix, suffix) |
309 | 309 | return partial if partial |
310 | 310 | end | ... | ... |