Sha256: 2992166daf2a8458442711123a247ef56a0fb2e9916532c50b82fe71eaeeeb06
Contents?: true
Size: 712 Bytes
Versions: 10
Compression:
Stored size: 712 Bytes
Contents
module BulmaFormBuilder module Inputs module MonthField extend ActiveSupport::Concern include Base included do def month_field_with_bulma(name, options = {}) form_field_builder(name, options) do classes = [options[:class]] classes <<= 'input' classes <<= 'is-danger' if error?(name) options[:class] = classes.compact.join(' ') # NOTE: month_fieldの場合だけこれがないと初期値が入らないので options[:value] = object.public_send(name) month_field_without_bulma(name, options) end end bulma_alias :month_field end end end end
Version data entries
10 entries across 10 versions & 1 rubygems