Sha256: a2823b22bfd51b8290bf6fe3f317f2c19f1b3f8d1393084307beaf7e995911a4
Contents?: true
Size: 661 Bytes
Versions: 1
Compression:
Stored size: 661 Bytes
Contents
# frozen_string_literal: true module Decidim # A heper to expose an easy way to add authorization forms in a view. module DecidimFormHelper # A custom form for that injects client side validations with Abide. # # record - The object to build the form for. # options - A Hash of options to pass to the form builder. # &block - The block to execute as content of the form. # # Returns a String. def decidim_form_for(record, options = {}, &block) options[:data] ||= {} options[:data].update(abide: true, "live-validate" => true, "validate-on-blur" => true) form_for(record, options, &block) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
decidim-core-0.2.0 | app/helpers/decidim/decidim_form_helper.rb |