Sha256: 348931092205a51eb545ce4e3195115aa3f6a87b350240f3a0aea2ee28af6013

Contents?: true

Size: 520 Bytes

Versions: 5

Compression:

Stored size: 520 Bytes

Contents

require 'bh/helpers/form/fieldset_helper'

module Bh
  module Form
    module FieldsForHelper
      include BaseHelper
      include FieldsetHelper # for fieldset

      def fields_for(record_object = nil, fields_options = {}, &block)
        fields_options[:layout] ||= @options[:layout]
        fields_options[:errors] ||= @options[:errors]
        title = fields_options.delete(:title) { record_object.to_s.humanize }
        fieldset(title) { super record_object, fields_options, &block }
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bh-1.0.0 lib/bh/helpers/form/fields_for_helper.rb
bh-0.0.8 lib/bh/helpers/form/fields_for_helper.rb
bh-0.0.7 lib/bh/helpers/form/fields_for_helper.rb
bh-0.0.6 lib/bh/helpers/form/fields_for_helper.rb
bh-0.0.5 lib/bh/helpers/form/fields_for_helper.rb