image_alt(src)
Instance Public methods
Returns a string suitable for an html image tag alt attribute. The
src
argument is meant to be an image file path. The method
removes the basename of the file path and the digest, if any. It also
removes hyphens and underscores from file names and replaces them with
spaces, returning a space-separated, titleized string.
Examples
image_alt('rails.png') # => Rails image_alt('hyphenated-file-name.png') # => Hyphenated file name image_alt('underscored_file_name.png') # => Underscored file name
Please login to continue.