Sha256: 9ea58d395c99c9ed1edb381e5733389489b4cc0161eee9970a842f52892a4948

Contents?: true

Size: 512 Bytes

Versions: 7

Compression:

Stored size: 512 Bytes

Contents

# frozen_string_literal: true

# Add a search-field, either specifying everything manually or using a model object on the form
#
# == Basic usage:
#    {%search_field name:"name" value:"1"%}
#
# == Advanced usage:
#    {%search_field name%}
#
# This last usage requires a model on the form
#

require_relative './text_field_tag'

class SearchFieldTag < TextFieldTag
  def initialize(tag, args, tokens)
    super
    @field_type = 'search'
  end
end

Liquid::Template.register_tag('search_field', SearchFieldTag)

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
scribo-1.0.44 lib/scribo/liquid/tags/search_field_tag.rb
scribo-1.0.43 lib/scribo/liquid/tags/search_field_tag.rb
scribo-1.0.42 lib/scribo/liquid/tags/search_field_tag.rb
scribo-1.0.41 lib/scribo/liquid/tags/search_field_tag.rb
scribo-1.0.40 lib/scribo/liquid/tags/search_field_tag.rb
scribo-1.0.39 lib/scribo/liquid/tags/search_field_tag.rb
scribo-1.0.38 lib/scribo/liquid/tags/search_field_tag.rb