Sha256: a5941c5ee481b7d879a4454a40ead1b30af204b07f699f2a302b963d95fc0eba
Contents?: true
Size: 567 Bytes
Versions: 22
Compression:
Stored size: 567 Bytes
Contents
module ConstructorPages module PagesHelper def for_select(roots) result = [] roots.each do |r| r.self_and_descendants.each {|i| result.push(["#{'--'*i.level} #{i.name}", i.id, {'data-full_url' => i.full_url}])} end result end def templates Template.all.map{|t| ["#{'--'*t.level} #{t.name}", t.id]} end def image_tag_with_at2x(name_at_1x, options={}) name_at_2x = name_at_1x.gsub(%r{\.\w+$}, '@2x\0') image_tag(name_at_1x, options.merge("data-at2x" => asset_path(name_at_2x))) end end end
Version data entries
22 entries across 22 versions & 2 rubygems