collection-renderer-lib/resources/collection_preview/bootstrap.rb
# Takes a path like foo/bar and returns the path to the ERB partial file name: foo/_bar.html.erb
Takes a path like foo/bar and returns the path to the ERB partial file name: foo/_bar.html.erb
Takes a path like foo / bar and returns the path to the ERB partial file name : foo / _bar . html . erb
def partial_path_to_resource_path(partial_path)
  parts = partial_path.split("/")
  file_name = "_#{parts.last}.html.erb"
  parts = parts[0..-2] + [file_name]
  relative_path = parts.join("/")
  "#{resource_prefix}#{relative_path}"
end
def partial_path_to_resource_path ( partial_path ) parts = partial_path . split ( "/" ) file_name = "_#{parts.last}.html.erb" parts = parts [ 0 .. - 2 ] + [ file_name ] relative_path = parts . join ( "/" ) "#{resource_prefix}#{relative_path}" end
Takes a path like foo/bar and returns the path to the ERB partial file name: foo/_bar.html.erb
Takes a path like foo / bar and returns the path to the ERB partial file name : foo / _bar . html . erb
partial_path
<not_specific>