Sha256: 5a2610f3078876d817e8fa257b990c29e05cc86c363b1d114ff103b2384c4f11
Contents?: true
Size: 378 Bytes
Versions: 2
Compression:
Stored size: 378 Bytes
Contents
module HolderRails module Helpers def holder_tag(size, text='', theme=nil, html_options={}) size = "#{size}x#{size}" unless size =~ /^\d+x\d+$/ 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
holder_rails-0.0.3 | lib/holder_rails/helpers.rb |
holder_rails-0.0.2 | lib/holder_rails/helpers.rb |