instance method
aliased_path_for
Ruby on Rails 3.2.22.5
Since v3.2.22.5 Last seen in v3.2.22.5Signature
aliased_path_for(logical_path)
No documentation comment.
Parameters
-
logical_pathreq
Source
# File actionpack/lib/sprockets/static_compiler.rb, line 48
def aliased_path_for(logical_path)
if File.basename(logical_path).start_with?('index')
logical_path.sub(/\/index([^\/]+)$/, '\1')
else
logical_path.sub(/\.([^\/]+)$/, '/index.\1')
end
end
Defined in actionpack/lib/sprockets/static_compiler.rb line 48
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Sprockets::StaticCompiler