Sha256: 65886febb0be9ef17d600980319b226ca254b1dde31f738683bdf1584c22fd75
Contents?: true
Size: 513 Bytes
Versions: 7
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true # Adds a (by default submit) button # # == Basic usage: # {%select name:'group'%}{%endselect%} # # == Advanced usage: # {%select group%}{%endselect%} # class SelectTag < LiquidumBlock def render(context) super %[<select] + attr_str(:name, arg(:name), input(:name, argv1)) + attr_str(:id, arg(:id), input(:id, argv1)) + attrs_str(reject: %[name id]) + %[>] + render_body + %[</select>] end end Liquid::Template.register_tag('select', SelectTag)
Version data entries
7 entries across 7 versions & 1 rubygems