Sha256: 39602fea09457560a49ac2a850f9a6e3f65d4c4d020e69c08a6ffa36c3a136c0

Contents?: true

Size: 441 Bytes

Versions: 5

Compression:

Stored size: 441 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] ||= {: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

5 entries across 5 versions & 1 rubygems

Version Path
bootstrap_builder-0.2.0 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.1.2 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.1.1 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.1.0 lib/bootstrap_builder/helper.rb
bootstrap_builder-0.0.0 lib/bootstrap_builder/helper.rb