module Silverdot::ImageHelper
Public Class Methods
included(base)
click to toggle source
# File lib/silverdot/helpers/image_helper.rb, line 3 def self.included(base) base.alias_method_chain :image_path, :alternative base.alias_method_chain :image_alt, :alternative end
Public Instance Methods
image_alt_with_alternative(src)
click to toggle source
# File lib/silverdot/helpers/image_helper.rb, line 18 def image_alt_with_alternative(src) case src when Alternative src.parent.alt else image_alt_without_alternative(src) end end
image_path_with_alternative(source)
click to toggle source
# File lib/silverdot/helpers/image_helper.rb, line 8 def image_path_with_alternative(source) case source when Alternative source.src else image_path_without_alternative(source) end end
Also aliased as: path_to_image