Sha256: bc03078356d776f8f5a560f66c1c269783888e792447b75483038697c6cc7135
Contents?: true
Size: 579 Bytes
Versions: 19
Compression:
Stored size: 579 Bytes
Contents
# encoding: utf-8 module Prismic class Form attr_accessor :name, :form_method, :rel, :enctype, :action, :fields def initialize(api, name, fields, form_method, rel, enctype, action) @api = api @name = name @fields = fields @form_method = form_method @rel = rel @enctype = enctype @action = action end def default_data Hash[fields.map{|key, field| [key, field.default] if field.default }.compact] end def create_search_form(data={}, ref=nil) SearchForm.new(@api, self, data, ref) end end end
Version data entries
19 entries across 19 versions & 1 rubygems