Sha256: 9515aa1822d152a0e05042868ceeaf5e057f36965682d262b698d856202f5e6d
Contents?: true
Size: 595 Bytes
Versions: 22
Compression:
Stored size: 595 Bytes
Contents
module ConstructorPages module PagesHelper include TreeviewHelper 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 & 3 rubygems