Sha256: 0e1392a528ffe20fcbeb8169a244f00636c3a801553a9c48de0e004febe517c5
Contents?: true
Size: 412 Bytes
Versions: 9
Compression:
Stored size: 412 Bytes
Contents
module FuturismHelper def futurize(records, extends: :tr, &block) placeholder = capture(&block) Array(records).map { |record| case extends when :tr content_tag :tr, placeholder, data: { sgid: record.to_sgid.to_s }, is: "futurism-table-row" else content_tag :"futurism-element", placeholder, data: { sgid: record.to_sgid.to_s } end }.join.html_safe end end
Version data entries
9 entries across 9 versions & 1 rubygems