Sha256: b968a17990b926af83d53c3d5234d7391ff80408ffb8bafcdea6fb744008459e

Contents?: true

Size: 464 Bytes

Versions: 11

Compression:

Stored size: 464 Bytes

Contents

module BootstrapBuilder::Helper
  
  def bootstrap_form_for(record_or_name_or_array, *args, &proc)
    options = args.extract_options!
    options.merge!(:builder => BootstrapBuilder::Builder)
    options[:html] ||= { }
    options[:html][:class] ||= ''
    if !(options[:html][:class] =~ /form-/)
      options[:html][:class] += ' ' + BootstrapBuilder.config.default_form_class
    end
    form_for(record_or_name_or_array, *(args << options), &proc)
  end
  
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
bootstrap_builder-0.4.0 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.3.3 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.3.2 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.3.1 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.3.0 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.2.6 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.2.5 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.2.4 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.2.3 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.2.2 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.2.1 lib/bootstrap_builder/helper.rb