Sha256: 3b03f91c8b6ae1bdf17b165e9fb50b574b2ff3c7aa565f8d6594367aa1873373
Contents?: true
Size: 281 Bytes
Versions: 1
Compression:
Stored size: 281 Bytes
Contents
require "action_view/helpers" module JSONBlob module ActionView def json_blob(name, data) content = JSONBlob.dump(data) content_tag(:script, content, data: {name: name}, type: "application/json;base64") end ::ActionView::Helpers.include(self) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
json_blob-0.1.0 | lib/json_blob/action_view.rb |