Sha256: 7a3441b19f4a5aee1173810afa117c81f73098e969a8f6413104b3d3d0a8b4a8

Contents?: true

Size: 854 Bytes

Versions: 1

Compression:

Stored size: 854 Bytes

Contents

# frozen_string_literal: true

module MrCommon
  class Engine < ::Rails::Engine
    isolate_namespace MrCommon

    config.assets.paths << File.expand_path("../../vendor/assets/stylesheets", __FILE__)
    config.assets.precompile += %w( mr_common/mr_common.css mr_common/mr_common.js )

    # use customized form-builder with form-group and errors methods
    config.action_view.default_form_builder = "MrCommon::ApplicationFormBuilder"

    # dont conditionally wrap inputs and labels with an extra div
    config.action_view.field_error_proc = proc do |html_tag, _instance|
      html_tag
    end

    initializer :append_migrations do |app|
      unless app.root.to_s.match? root.to_s
        config.paths["db/migrate"].expanded.each do |expanded_path|
          app.config.paths["db/migrate"] << expanded_path
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mr_common-1.0.3 lib/mr_common/engine.rb