Sha256: 72ba8a51aa20b0caf5c5eca21976f0188dcb0a0c0f2759b666debf66895d29f6
Contents?: true
Size: 330 Bytes
Versions: 6
Compression:
Stored size: 330 Bytes
Contents
ApplicationHelper.class_eval do def widget name, opts={} tag, name = name.split(':') if name === String tag = :div id = Lux.current.uid data = block_given? ? yield : nil { class: 'w %s' % name, id: id, 'data-json': opts.to_json }.tag(tag, data) + %[<script>Widget.bind('#{id}');</script>] end end
Version data entries
6 entries across 6 versions & 1 rubygems