Sha256: 3f270ae430daf23c2c5872e63aa4922e7445923a4fa0a251dab2265325354365
Contents?: true
Size: 382 Bytes
Versions: 17
Compression:
Stored size: 382 Bytes
Contents
module HolderRails module Helpers def holder_tag(size, text='', theme=nil, html_options={}) size = "#{size}x#{size}" unless size =~ /\A\d+%?x\d+\z/ text = text.to_s.empty? ? size : text options = {:src => '', :data => {:src => "holder.js/#{size}/text:#{text}/#{theme}"}} options = options.merge(html_options) tag :img, options end end end
Version data entries
17 entries across 17 versions & 1 rubygems