Sha256: 07743bbe2f1f2718157990d1a786daf350d50cfba5c9fe0dbd34646dea517a3c

Contents?: true

Size: 683 Bytes

Versions: 1

Compression:

Stored size: 683 Bytes

Contents

module BootstrapsBootstraps
  class Railtie < Rails::Railtie

    initializer "bootstraps_bootstraps.configure_rails_initialization" do |application|
      # Prevent Rails from wrapping form elements with errors in <div class="field_with_error">
      # boxes.  Bootstrap has a bit of a different paradigm.
      # Credit where due: http://stackoverflow.com/questions/5267998/rails-3-field-with-errors-wrapper-changes-the-page-appearance-how-to-avoid-t
      application.config.action_view.field_error_proc = Proc.new { |html_tag, instance| html_tag }
      ActiveSupport.on_load :action_view do
        include BootstrapsBootstraps::BootstrapFormHelper
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bootstraps_bootstraps-2.0.3 lib/bootstraps_bootstraps/railtie.rb