Sha256: a07dac50a6ae2d934a0ec32b7bd94c7fe16bea09bb545f7bd83bca6880bffabf

Contents?: true

Size: 689 Bytes

Versions: 1

Compression:

Stored size: 689 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 }
    end

    config.to_prepare do
      ::ActionView::Helpers.send(:include, BootstrapsBootstraps::BootstrapFormHelper)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

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