Sha256: 886c22dca89a301e1cc2c027abc6756910e1d9db3396a6229d47d8c1be412efc

Contents?: true

Size: 489 Bytes

Versions: 1

Compression:

Stored size: 489 Bytes

Contents

#encoding: utf-8

class I18nAttributes::InstallGenerator < Rails::Generators::Base
  source_root File.expand_path('../templates', __FILE__)

  def create_initializer_file
    template "i18n_attributes.rb", 'config/initializers/i18n_attributes.rb'
  end

  def modify_application_config
    inject_into_file 'config/application.rb', :after => /< Rails::Application[\s]*$/ do
      %Q|
    config.i18n.load_path += Dir[%Q`\#{config.root}/config/locales/**/*.{rb,yml}`]
|
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
i18n_attributes-0.1.6 lib/generators/i18n_attributes/install/install_generator.rb