Skip to content

Commit

Permalink
Merge pull request #773 from pharris2411/master
Browse files Browse the repository at this point in the history
  • Loading branch information
nesquena authored Jan 3, 2025
2 parents a057a81 + ed15273 commit f66fc1f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/rabl/sources.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ module Sources
# Returns source for a given relative file
# fetch_source("show", :view_path => "...") => "...contents..."
def fetch_source(file, options = {})
view_paths = Array(options[:view_path]) + Array(Rabl.configuration.view_paths)
custom_view_path = Array(options[:view_path])

Rabl.source_cache(file, custom_view_path) do
view_paths = custom_view_path + Array(Rabl.configuration.view_paths)

Rabl.source_cache(file, view_paths) do
file_path = \
if defined?(Padrino) && context_scope.respond_to?(:settings) && context_scope.respond_to?(:resolve_template)
fetch_padrino_source(file, options)
Expand Down

0 comments on commit f66fc1f

Please sign in to comment.