Flowdock
method

rewrite_extension

Importance_0
v3.2.13 - Show latest stable - 0 notes - Class: AssetPaths
rewrite_extension(source, dir, ext) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionpack/lib/action_view/helpers/asset_tag_helpers/asset_paths.rb, line 30
        def rewrite_extension(source, dir, ext)
          source_ext = File.extname(source)

          source_with_ext = if source_ext.empty?
            "#{source}.#{ext}"
          elsif ext != source_ext[1..-1]
            with_ext = "#{source}.#{ext}"
            with_ext if File.exist?(File.join(config.assets_dir, dir, with_ext))
          end

          source_with_ext || source
        end
Register or log in to add new notes.