Sha256: cfb1e597ccbcd93c734d3a82cbf177c14ca6db08f1d8554f4a3db72ac879e6da

Contents?: true

Size: 731 Bytes

Versions: 11

Compression:

Stored size: 731 Bytes

Contents

module GettextI18nRails
  class Railtie < ::Rails::Railtie
    config.gettext_i18n_rails = ActiveSupport::OrderedOptions.new
    config.gettext_i18n_rails.msgmerge = nil
    config.gettext_i18n_rails.msgcat = nil
    config.gettext_i18n_rails.xgettext = nil
    config.gettext_i18n_rails.use_for_active_record_attributes = true

    rake_tasks do
      if Gem::Specification.find_all_by_name("gettext", ">= 3.0.2").any?
        require 'gettext_i18n_rails/tasks'
      end
    end

    config.after_initialize do |app|
      if app.config.gettext_i18n_rails.use_for_active_record_attributes
        ActiveSupport.on_load :active_record do
          require 'gettext_i18n_rails/active_model'
        end
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gettext_i18n_rails-1.13.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.12.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.11.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.10.1 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.10.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.9.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.8.1 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.8.0 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.7.2 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.7.1 lib/gettext_i18n_rails/railtie.rb
gettext_i18n_rails-1.7.0 lib/gettext_i18n_rails/railtie.rb