Sha256: 9f342cdbf1a204b564b97a89c4e1501d31aa437fc7a6b82d473535803dc0bdbb

Contents?: true

Size: 341 Bytes

Versions: 7

Compression:

Stored size: 341 Bytes

Contents

class I18n::ScaffoldGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('../templates', __FILE__)

  argument :attributes, type: :array, default: [], banner: "field:type field:type"

  def create_localization_file
    template 'en.yml.erb', File.join('config/locales', class_path, "#{plural_file_name}_en.yml")
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
i18n_scaffold_generator-1.1.1 lib/generators/i18n/scaffold/scaffold_generator.rb
i18n_scaffold_generator-1.1.0 lib/generators/i18n/scaffold/scaffold_generator.rb
i18n_scaffold_generator-1.0.4 lib/generators/i18n/scaffold/scaffold_generator.rb
i18n_scaffold_generator-1.0.3 lib/generators/i18n/scaffold/scaffold_generator.rb
i18n_scaffold_generator-1.0.2 lib/generators/i18n/scaffold/scaffold_generator.rb
i18n_scaffold_generator-1.0.1 lib/generators/i18n/scaffold/scaffold_generator.rb
i18n_scaffold_generator-1.0.0 lib/generators/i18n/scaffold/scaffold_generator.rb